Skip to content

Commit ac02295

Browse files
authored
Merge pull request #1211 from pekrau/bugfix
Fixed bug. Closes #1210.
2 parents 31153a8 + 7ac07e9 commit ac02295

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

orderportal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import pycountry
1111

1212

13-
__version__ = "11.3.5"
13+
__version__ = "11.3.6"
1414

1515

1616
class Constants:

orderportal/order.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ def autopopulate(self):
7777
for source in ["department", "phone", "invoice_ref", "invoice_vat"]:
7878
target = autopopulate.get(source)
7979
if target and target in self["fields"]:
80-
self["fields"][target] = account[source]
80+
self["fields"][target] = account.get(source)
8181
# Postal address fields.
8282
for source in ["university", "department", "address", "zip", "city"]:
8383
target = autopopulate.get(f"address.{source}")
8484
if target and target in self["fields"]:
85+
# Field 'address' is a dict, and exists always.
8586
self["fields"][target] = account["address"].get(source)
8687
target = autopopulate.get("address.country")
8788
if target and target in self["fields"]:

0 commit comments

Comments
 (0)