Skip to content
Snippets Groups Projects
Commit 09297a8c authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Restrict AKWall to dates belonging to the corresponding event

parent 39a761c1
No related branches found
No related tags found
1 merge request!20Restrict AKWall to dates belonging to the corresponding event
......@@ -60,8 +60,11 @@ class PlanScreenView(PlanIndexView):
def get_queryset(self):
# Determine interesting range (some hours ago until some hours in the future as specified in the settings)
self.start = datetime.now().astimezone(self.event.timezone) - timedelta(hours=settings.PLAN_WALL_HOURS_RETROSPECT)
self.end = self.start + timedelta(hours=(settings.PLAN_WALL_HOURS_RETROSPECT + settings.PLAN_WALL_HOURS_FUTURE))
if self.event.start < datetime.now().astimezone(self.event.timezone) < self.event.end:
self.start = datetime.now().astimezone(self.event.timezone) - timedelta(hours=settings.PLAN_WALL_HOURS_RETROSPECT)
else:
self.start = self.event.start
self.end = self.event.end
# Restrict AK slots to relevant ones
# This will automatically filter all rooms not needed for the selected range in the orginal get_context method
......
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