aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-01-27 21:48:53 +0100
committerAlban Gruin2017-01-28 13:15:57 +0100
commitdfb352540ce5a66ef475f0c6d855fc2f322d553a (patch)
tree6e73d6e2d65cf542afccf0e8e4cf4a03a9131150 /models.py
parent6a7f243eabdc1007e8effcc6d8efa6a990fe40c1 (diff)
Bon en fait pas de surcharge
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 f1ff118..bcd9215 100644
--- a/models.py
+++ b/models.py
@@ -53,8 +53,8 @@ class Group(models.Model):
slug = models.SlugField(max_length=64, unique=True, default="")
- def __contains__(self, group):
- return self.timetable == group.timetable and self.mention == group.mention and self.subgroup == group.subgroup and (self.td == group.td or self.td is None or group.td is None) and (self.tp == group.tp or self.tp is None or group.tp is None)
+ 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)
def __str__(self):
return self.name