mirror of
https://github.com/pretix/pretix.git
synced 2026-08-13 11:17:01 +00:00
fix more occurences
This commit is contained in:
@@ -1697,7 +1697,7 @@ class AbstractPosition(RoundingCorrectionMixin, models.Model):
|
||||
self.company,
|
||||
self.street,
|
||||
(self.zipcode or '') + ' ' + (self.city or '') + ' ' + (self.state_for_address or ''),
|
||||
self.country.name
|
||||
self.country.name if self.country else ''
|
||||
]
|
||||
lines = [r.strip() for r in lines if r]
|
||||
return '\n'.join(lines).strip()
|
||||
|
||||
@@ -1158,7 +1158,7 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
|
||||
for a in addresses:
|
||||
data = {
|
||||
"_pk": a.pk,
|
||||
"_country_for_address": a.country.name,
|
||||
"_country_for_address": a.country.name if a.country else '',
|
||||
"_state_for_address": a.state_for_address,
|
||||
"_name": a.name,
|
||||
"is_business": "business" if a.is_business else "individual",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<dt>{% trans "ZIP code and city" %}</dt>
|
||||
<dd>{{ addr.zipcode }} {{ addr.city }}</dd>
|
||||
<dt>{% trans "Country" %}</dt>
|
||||
<dd>{{ addr.country.name }}</dd>
|
||||
<dd>{{ addr.country.name|default_if_none:"" }}</dd>
|
||||
{% if addr.state %}
|
||||
<dt>{% trans "State" context "address" as state_label %}{{ COUNTRY_STATE_LABEL|getitem:addr.country.code|default:state_label }}</dt>
|
||||
<dd>{{ addr.state_name }}</dd>
|
||||
|
||||
Reference in New Issue
Block a user