diff options
author | Leif Johansson <leifj@sunet.se> | 2011-02-11 22:18:32 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-02-11 22:18:32 +0100 |
commit | 4e10300880442d4662ae4124ab8be1cee8071eef (patch) | |
tree | c9efc93bd158a4dfae8a61df9a6f69cdbc39a8e1 /src/meetingtools/apps | |
parent | fa2e40e9fcdb30c245b140a00ba6f05af7b786e6 (diff) |
fix uniqueness bugs
Diffstat (limited to 'src/meetingtools/apps')
-rw-r--r-- | src/meetingtools/apps/room/models.py | 6 | ||||
-rw-r--r-- | src/meetingtools/apps/room/views.py | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/meetingtools/apps/room/models.py b/src/meetingtools/apps/room/models.py index d69ee93..9c2c489 100644 --- a/src/meetingtools/apps/room/models.py +++ b/src/meetingtools/apps/room/models.py @@ -12,14 +12,14 @@ from meetingtools.apps.cluster.models import ACCluster class Room(models.Model): creator = ForeignKey(User,editable=False) - name = CharField(max_length=128,blank=True,unique=True) - urlpath = CharField(max_length=128,blank=True,unique=True) + name = CharField(max_length=128,unique=True) + urlpath = CharField(max_length=128,unique=True) acc = ForeignKey(ACCluster,verbose_name="Adobe Connect Cluster",editable=False) participants = CharField(max_length=255,blank=True,verbose_name="Participants") # populate from entitlement held by creator session presenters = CharField(max_length=255,blank=True,verbose_name="Presenters") # populate from entitlement held by creator session hosts = CharField(max_length=255,blank=True,verbose_name="Hosts") # populate from entitlement held by creator session self_cleaning = BooleanField(verbose_name="Clean-up when empty?") - sco_id = IntegerField(verbose_name="Adobe Connect Room",blank=False) + sco_id = IntegerField(verbose_name="Adobe Connect Room") source_sco_id = IntegerField(verbose_name="Template",blank=True,null=True) folder_sco_id = IntegerField(verbose_name="Adobe Connect Room Folder",editable=False) timecreated = models.DateTimeField(auto_now_add=True) diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index 2921489..85b44e2 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -205,8 +205,6 @@ def _import_room(request,acc,sco_id,source_sco_id,folder_sco_id,name,urlpath): logging.debug(room.id) room.save() - - return room @login_required @@ -229,6 +227,10 @@ def list(request): r.delete() return respond_to(request,{'text/html':'apps/room/list.html'},{'user':request.user,'rooms':Room.objects.filter(creator=request.user).all()}) +def rooms_by_group(request,group): + for room in Room.objects.filter(participants=group): + pass + @login_required def delete(request,id): room = get_object_or_404(Room,pk=id) |