Commit 600462b4 authored by Robert's avatar Robert

Fix handling of GET parameters

parent 18d1ac5d
......@@ -57,11 +57,16 @@ class Calendar(python_calendar.LocaleHTMLCalendar):
@register.inclusion_tag('events/_calendar.html', takes_context=True)
def calendar(context, associations, size='preview', component_id=None):
request = context.get('request')
month = int(request.GET.get('month', 0))
year = int(request.GET.get('year', 0))
except ValueError:
around =
around = around.replace(
month=int(request.GET.get('month', around.month)),
year=int(request.GET.get('year', around.year)))
month=month or around.month,
year=year or around.year)
event_associations = associations.filter_events()
calendar_associations = event_associations.filter(
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment