Skip to content
Snippets Groups Projects
Commit 873f373d authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

The cache didn't invalidate as expected

parent efa1e680
Branches
Tags
No related merge requests found
......@@ -46,9 +46,6 @@ def add_public_registration_question(sender, position, **kwargs):
@receiver(signal=front_page_bottom, dispatch_uid="public_registrations_table")
def add_public_registrations_table(sender, **kwargs):
cached = sender.cache.get('public_registrations_table_' + get_language())
if cached is None:
cached = ""
public_questions = sender.questions.filter(pk__in=sender.settings.get('public_registrations_questions'))
headers = (
[_("Product")] if sender.settings.get('public_registrations_show_item_name') else []
......@@ -83,12 +80,10 @@ def add_public_registrations_table(sender, **kwargs):
} for pop in public_order_positions
]
template = get_template('pretix_public_registrations/front_page.html')
cached = template.render({
return template.render({
'headers': headers,
'public_registrations': public_registrations
})
sender.cache.set('public_registrations_table_' + get_language(), cached)
return cached
@receiver(signal=process_response, dispatch_uid="public_registragions_csp_headers")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment