diff options
author | Leif Johansson <leifj@sunet.se> | 2011-03-14 22:40:53 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-03-14 22:40:53 +0100 |
commit | bf9d7779e715e3f876d3843f3dac4c08af242fa0 (patch) | |
tree | 053fd9ff7d93ccf29a708d8e895ee61ddfa55d0e /src | |
parent | 030995de0fd765b8209ced0840a2531d6cf35ee7 (diff) |
acc+sco_id must be unique
Diffstat (limited to 'src')
-rw-r--r-- | src/meetingtools/apps/room/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/meetingtools/apps/room/models.py b/src/meetingtools/apps/room/models.py index af617ae..f0adb99 100644 --- a/src/meetingtools/apps/room/models.py +++ b/src/meetingtools/apps/room/models.py @@ -27,6 +27,9 @@ class Room(models.Model): lastupdated = models.DateTimeField(auto_now=True) lastvisited = models.DateTimeField(blank=True,null=True) + class Meta: + unique_together = ('acc','sco_id') + def __unicode__(self): return "%s (sco_id=%s,source_sco_id=%s,folder_sco_id=%s,urlpath=%s)" % (self.name,self.sco_id,self.source_sco_id,self.folder_sco_id,self.urlpath) |