Only objectify address data if present
i.e. don't try to "remove" an address if no fields are present in form
This commit is contained in:
parent
60334229d5
commit
4a9b528c47
|
@ -2752,7 +2752,7 @@ class MasterView(View):
|
|||
else:
|
||||
contact.add_mailing_address(**addr)
|
||||
|
||||
elif contact.addresses:
|
||||
elif any([field in data for field in address_fields]) and contact.addresses:
|
||||
contact.addresses.pop()
|
||||
|
||||
return contact
|
||||
|
|
Loading…
Reference in a new issue