Skip to content
Snippets Groups Projects
Commit 4fa3f6f0 authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

Merge branch 'fix-api' into 'main'

Fix API detail views

See merge request kif/akplanning!89
parents 42f4957c fd0b8982
No related branches found
No related tags found
1 merge request!89Fix API detail views
Pipeline #21477 passed
......@@ -38,6 +38,11 @@ class EventSlugMixin:
self._load_event()
return super().create(request, *args, **kwargs)
def initial(self, request, *args, **kwargs):
if self.event is None:
self._load_event()
super().initial(request, *args, **kwargs)
def get_context_data(self, *, object_list=None, **kwargs):
context = super().get_context_data(object_list=object_list, **kwargs)
# Add event to context (to make it accessible in templates)
......
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