From 77cfabcd4172211799f3524a34ec81191e4ec4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <felix@thegcat.net> Date: Fri, 13 Sep 2019 00:03:32 +0200 Subject: [PATCH] Don't show public registrations before they are configured --- pretix_public_registrations/signals.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pretix_public_registrations/signals.py b/pretix_public_registrations/signals.py index 5776f44..c7e6032 100644 --- a/pretix_public_registrations/signals.py +++ b/pretix_public_registrations/signals.py @@ -55,6 +55,12 @@ 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): + if not sender.settings.get('public_registrations_items') and not ( + sender.settings.get('public_registrations_questions') + and sender.settings.get('public_registrations_show_item_name') + and sender.settings.get('public_registrations_show_attendee_name') + ): + return "" 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 [] -- GitLab