aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'models.py')
-rw-r--r--models.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/models.py b/models.py
index bde27a7..59301e0 100644
--- a/models.py
+++ b/models.py
@@ -98,19 +98,18 @@ class Group(models.Model):
hidden = models.BooleanField(verbose_name="caché", default=False)
- def corresponds_to(self, timetable_id, mention, subgroup):
+ def corresponds_to(self, mention, subgroup):
subgroup_corresponds = True
if self.subgroup is not None and subgroup is not None:
subgroup_corresponds = self.subgroup.startswith(subgroup)
- return self.timetable.id == timetable_id and \
- (self.mention.startswith(mention) or \
- mention.startswith(self.mention)) and \
- subgroup_corresponds
+ return (self.mention.startswith(mention) or \
+ mention.startswith(self.mention)) and \
+ subgroup_corresponds
@property
def group_info(self):
- return self.timetable.id, self.mention, self.subgroup
+ return self.mention, self.subgroup
def __str__(self):
return self.name