diff options
author | Alban Gruin | 2017-01-27 21:48:53 +0100 |
---|---|---|
committer | Alban Gruin | 2017-01-27 21:48:53 +0100 |
commit | 64145d7d43d8e6fbda5630e6e643ef259b6fa881 (patch) | |
tree | dbf9f849f4be601fe6a402ce3e47b568734853d6 | |
parent | 4b9ff291e35163b6d0ffcff78878e9ba23bf23dc (diff) |
Bon en fait pas de surcharge
-rw-r--r-- | models.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -44,8 +44,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 |