summaryrefslogtreecommitdiff
path: root/src/meetingtools
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-10-25 09:25:00 +0200
committerLeif Johansson <leifj@sunet.se>2011-10-25 09:25:00 +0200
commit7d794b98d683e569e3525c6d55ac07e2aeb6ee00 (patch)
treef8fe533d288729d568692dec8742c32803299701 /src/meetingtools
parent7d12a9efcd6423cca2528766332d91819a2131c2 (diff)
don't die on db operation at import
Diffstat (limited to 'src/meetingtools')
-rw-r--r--src/meetingtools/apps/room/views.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index c09556b..4b85c12 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -242,8 +242,12 @@ def _import_room(request,acc,r):
room = Room.objects.get(sco_id=r['sco_id'],acc=acc)
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'])
-
+ try:
+ room = Room.objects.create(sco_id=r['sco_id'],acc=acc,creator=request.user,folder_sco_id=r['folder_sco_id'])
+ except Exception,e:
+ room = None
+ pass
+
if not room:
return None