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

Better handle missing attendee email, cached name not required anymore

parent 0fa7d336
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ def add_public_registrations_table(sender, **kwargs): ...@@ -71,7 +71,7 @@ def add_public_registrations_table(sender, **kwargs):
} }
public_registrations = [ 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': ( 'fields': (
[pop.item.name] if sender.settings.get('public_registrations_show_item_name') else [] [pop.item.name] if sender.settings.get('public_registrations_show_item_name') else []
) + ( ) + (
...@@ -80,7 +80,7 @@ def add_public_registrations_table(sender, **kwargs): ...@@ -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 '' 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 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') template = get_template('pretix_public_registrations/front_page.html')
cached = template.render({ cached = template.render({
......
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