From 1e1c61e7bfa8efe3d7461b8d0b67bc5f52699673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <felix@thegcat.net> Date: Wed, 11 Sep 2019 21:31:31 +0200 Subject: [PATCH] Better handle missing attendee email, cached name not required anymore --- pretix_public_registrations/signals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pretix_public_registrations/signals.py b/pretix_public_registrations/signals.py index 873e687..5554e31 100644 --- a/pretix_public_registrations/signals.py +++ b/pretix_public_registrations/signals.py @@ -71,7 +71,7 @@ def add_public_registrations_table(sender, **kwargs): } public_registrations = [ { - 'gr_url': get_gravatar_url(pop.attendee_email, size=24, default="wavatar"), + 'gr_url': get_gravatar_url(pop.attendee_email or pop.order.code, size=24, default="wavatar"), 'fields': ( [pop.item.name] if sender.settings.get('public_registrations_show_item_name') else [] ) + ( @@ -80,7 +80,7 @@ def add_public_registrations_table(sender, **kwargs): public_answers[pop.pk][pq.pk].answer if public_answers.get(pop.pk, None) and public_answers[pop.pk].get(pq.pk, None) else '' for pq in public_questions ] - } for pop in public_order_positions if pop.attendee_email and pop.attendee_name_cached + } for pop in public_order_positions ] template = get_template('pretix_public_registrations/front_page.html') cached = template.render({ -- GitLab