Compare commits

...

4 Commits

Author SHA1 Message Date
Richard Schreiber fe719f3416 handle country=None in InvoiceAddress even if it is not allowed 2026-06-24 10:59:38 +02:00
Richard Schreiber 315b424eb5 fix more occurences 2026-06-24 10:39:35 +02:00
Richard Schreiber fe2e2142e7 Update checkoutflow.py 2026-06-24 10:36:05 +02:00
Richard Schreiber 2aca779a1e Fix handling country=None in AttendeeProfile describe 2026-06-24 10:34:31 +02:00
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -395,7 +395,7 @@ class AttendeeProfile(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 None,
]
for a in self.answers:
value = a.get('value')
+2 -2
View File
@@ -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()
@@ -3438,7 +3438,7 @@ class InvoiceAddress(models.Model):
self.name,
self.street,
(self.zipcode or '') + ' ' + (self.city or '') + ' ' + (self.state_for_address or ''),
self.country.name,
self.country.name if self.country else '',
self.vat_id,
self.custom_field,
self.internal_reference,
+2 -2
View File
@@ -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",
@@ -1201,7 +1201,7 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
for p in profiles:
data = {
"_pk": p.pk,
"_country_for_address": p.country.name,
"_country_for_address": p.country.name if p.country else '',
"_state_for_address": p.state_for_address,
"_attendee_name": p.attendee_name,
}
@@ -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>