diff options
-rw-r--r-- | models.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -53,6 +53,9 @@ 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 __str__(self): return self.name |