Fix some comparisons that broke in the last change

This commit is contained in:
Raphael Michel
2015-04-01 12:03:30 +02:00
parent cd0e1cb520
commit 2b732d3967
6 changed files with 7 additions and 7 deletions

View File

@@ -49,7 +49,7 @@
{% endif %}
{% if line.has_questions %}
<dl>
{% if line.item.admission and event.settings.attendee_names_asked == 'True' %}
{% if line.item.admission and event.settings.attendee_names_asked %}
<dt>{% trans "Attendee name" %}</dt>
<dd>{% if line.attendee_name %}{{ line.attendee_name }}{% else %}<em>{% trans "not answered" %}</em>{% endif %}</dd>
{% endif %}

View File

@@ -76,7 +76,7 @@ class OrderDetail(EventPermissionRequiredMixin, OrderView):
# We do this by list manipulations instead of a GROUP BY query, as
# Django is unable to join related models in a .values() query
def keyfunc(pos):
if ((pos.item.admission and self.request.event.settings.attendee_names_asked == 'True')
if ((pos.item.admission and self.request.event.settings.attendee_names_asked)
or pos.item.questions.all()):
return pos.id, "", "", ""
return "", pos.item_id, pos.variation_id, pos.price