summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-10-12 00:44:07 +0200
committerLeif Johansson <leifj@sunet.se>2011-10-12 00:44:07 +0200
commita96fdb3c6c44082dff9f9578bb292e24e0559cf3 (patch)
treeea53fdcc83f99adf09b1f40ccb241c7c884e6117 /src
parent3f994b6b22d1dad45bcc519cd068b8c1dd58b41f (diff)
room owner not requestor permissions
Diffstat (limited to 'src')
-rw-r--r--src/meetingtools/apps/room/views.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index 169cb1a..0ad535e 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -237,14 +237,8 @@ def _import_room(request,acc,r):
modified = False
room = None
- if not r.has_key('name'):
- return
-
try:
room = Room.objects.get(sco_id=r['sco_id'],acc=acc)
- if not room.name:
- room.delete()
- return
except ObjectDoesNotExist:
if r['folder_sco_id']:
room = Room.objects.create(sco_id=r['sco_id'],acc=acc,creator=request.user,folder_sco_id=r['folder_sco_id'])
@@ -274,6 +268,10 @@ def _import_room(request,acc,r):
#logging.debug(pformat(room))
+ if not room.name:
+ room.delete()
+ return None
+
if modified:
logging.debug("saving ... %s" % pformat(room))
room.save()