aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'models.py')
-rw-r--r--models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/models.py b/models.py
index ff4897b..2f130a3 100644
--- a/models.py
+++ b/models.py
@@ -51,7 +51,7 @@ class Group(models.Model):
td = models.IntegerField(verbose_name="groupe de TD", null=True)
tp = models.IntegerField(verbose_name="groupe de TP", null=True)
- slug = models.SlugField(max_length=64, unique=True, default="")
+ slug = models.SlugField(max_length=64, default="")
def corresponds_to(self, timetable_id, mention, subgroup, td, tp):
return self.timetable.id == timetable_id and self.mention == mention and self.subgroup == subgroup and (self.td == td or self.td is None or td is None) and (self.tp == tp or self.tp is None or tp is None)
@@ -83,7 +83,7 @@ class Group(models.Model):
class Meta:
index_together = ("mention", "subgroup", "td", "tp",)
- unique_together = (("name", "timetable",), ("celcat_name", "timetable",),)
+ unique_together = (("name", "timetable",), ("celcat_name", "timetable",), ("slug", "timetable",),)
verbose_name = "groupe"
verbose_name_plural = "groupes"