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

Add more comments

parent c73020b0
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
This commit is part of merge request !235. Comments created here will be created in the context of that merge request.
......@@ -125,9 +125,12 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
for timeslot in block:
time_constraints = []
# if reso_deadline is set and timeslot ends before it,
# add fulfilled time constraint 'resolution'
if self.event.reso_deadline is None or timeslot.avail.end < self.event.reso_deadline:
time_constraints.append("resolution")
# add fulfilled time constraints for all AKs that cannot happen during full event
time_constraints.extend([
f"availability-ak-{ak_id}"
for ak_id, availabilities in ak_availabilities.items()
......@@ -136,11 +139,13 @@ class AKJSONExportView(AdminViewMixin, FilterByEventSlugMixin, ListView):
or self._test_ak_fixed_in_slot(ak_id, timeslot.avail, ak_fixed)
)
])
# add fulfilled time constraints for all persons that are not available for full event
time_constraints.extend([
f"availability-person-{person_id}"
for person_id, availabilities in person_availabilities.items()
if self._test_add_constraint(timeslot.avail, availabilities)
])
# add fulfilled time constraints for all rooms that are not available for full event
time_constraints.extend([
f"availability-room-{room_id}"
for room_id, availabilities in room_availabilities.items()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment