Changeset 4a9b528 in tailbone


Ignore:
Timestamp:
03/06/19 21:06:48 (5 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
3760c32
Parents:
6033422
Message:

Only objectify address data if present

i.e. don't try to "remove" an address if no fields are present in form

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tailbone/views/master.py

    r6033422 r4a9b528  
    27532753                contact.add_mailing_address(**addr)
    27542754
    2755         elif contact.addresses:
     2755        elif any([field in data for field in address_fields]) and contact.addresses:
    27562756            contact.addresses.pop()
    27572757
Note: See TracChangeset for help on using the changeset viewer.