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:
Lance Edgar 2019-03-06 21:06:48 -06:00
parent 60334229d5
commit 4a9b528c47

View file

@ -2752,7 +2752,7 @@ class MasterView(View):
else: else:
contact.add_mailing_address(**addr) contact.add_mailing_address(**addr)
elif contact.addresses: elif any([field in data for field in address_fields]) and contact.addresses:
contact.addresses.pop() contact.addresses.pop()
return contact return contact