Skip to content
Snippets Groups Projects
Commit 1b1b56fd authored by Felix Blanke's avatar Felix Blanke
Browse files

Check all blocks of union if event is covered

parent 25a3b3f9
No related branches found
No related tags found
6 merge requests!262[WIP] compatibility with koma solver import/export,!261[WIP] compatibility with koma solver import/export,!260[WIP] import/export merge,!259Add view to clear schedule,!237Draft: add tests on json export,!235Merge fork for interoperability of KoMa solver
...@@ -293,7 +293,7 @@ class Availability(models.Model): ...@@ -293,7 +293,7 @@ class Availability(models.Model):
# event end + 1 day # event end + 1 day
full_event = Availability(event=event, start=event.start, end=event.end) full_event = Availability(event=event, start=event.start, end=event.end)
avail_union = Availability.union(availabilities) avail_union = Availability.union(availabilities)
return not avail_union or avail_union[0].contains(full_event) return any(avail.contains(full_event) for avail in avail_union)
class Meta: class Meta:
verbose_name = _('Availability') verbose_name = _('Availability')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment