diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/meetingtools/apps/cluster/models.py | 3 | ||||
-rw-r--r-- | src/meetingtools/apps/room/views.py | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/meetingtools/apps/cluster/models.py b/src/meetingtools/apps/cluster/models.py index 9921dd4..13b4aae 100644 --- a/src/meetingtools/apps/cluster/models.py +++ b/src/meetingtools/apps/cluster/models.py @@ -5,7 +5,7 @@ Created on Feb 3, 2011 ''' from django.db import models -from django.db.models.fields import CharField, URLField, TextField +from django.db.models.fields import CharField, URLField, TextField, IntegerField class ACCluster(models.Model): api_url = URLField() @@ -13,6 +13,7 @@ class ACCluster(models.Model): user = CharField(max_length=128) password = CharField(max_length=128) name = CharField(max_length=128,blank=True,unique=True) + default_template_sco_id = IntegerField(blank=True,unique=True) domain_match = TextField() def __unicode__(self): diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index 66d13cc..c2c02f2 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -190,7 +190,10 @@ def _update_room(request, room, form=None): def create(request): acc = _acc_for_user(request.user) my_meetings_sco_id = _user_meeting_folder(request,acc) - room = Room(creator=request.user,acc=acc,folder_sco_id=my_meetings_sco_id,source_sco_id=DEFAULT_TEMPLATE_SCO) + template_sco_id = acc.default_template_sco_id + if not template_sco_id: + template_sco_id = DEFAULT_TEMPLATE_SCO + room = Room(creator=request.user,acc=acc,folder_sco_id=my_meetings_sco_id,source_sco_id=template_sco_id) what = "Create" title = "Create a new room" @@ -312,7 +315,7 @@ def delete(request,id): def _clean(request,room): api = ac_api_client(request, room.acc) - api.request('sco-delete',{'sco-id':room.sco_id},raise_error=True) + api.request('sco-delete',{'sco-id':room.sco_id},raise_error=False) room.sco_id = None return _update_room(request, room) |