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

Fix check

parent 9db6b5b7
No related branches found
No related tags found
1 merge request!3Merge into fork's `main` branch
...@@ -584,7 +584,7 @@ class Room(models.Model): ...@@ -584,7 +584,7 @@ class Room(models.Model):
# event end + 1 day # event end + 1 day
full_event = Availability(event=self.event, start=self.event.start, end=self.event.end) full_event = Availability(event=self.event, start=self.event.start, end=self.event.end)
avail_union = Availability.union(self.availabilities.all()) avail_union = Availability.union(self.availabilities.all())
if len(avail_union) == 1 and avail_union[0].contains(full_event): if not avail_union or avail_union[0].contains(full_event):
time_constraints = [] time_constraints = []
else: else:
time_constraints = [f"availability-room-{self.pk}"] time_constraints = [f"availability-room-{self.pk}"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment