Changeset - ba8b366ba652
[Not reviewed]
0 1 0
Lance Edgar (lance) - 3 years ago 2021-10-17 16:24:40
lance@edbob.org
Restore "pending" customer when unassigning batch contact

unassign means "unset contact uuid" essentially, i.e. unassign the
"proper" contact. but if "pending" contact info is there, restore it
1 file changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rattail/batch/custorder.py
Show inline comments
 
@@ -253,6 +253,15 @@ class CustomerOrderBatchHandler(BatchHandler):
 
        """
 
        batch.customer = None
 
        batch.person = None
 

	
 
        # note that if batch already has a "pending" customer on file,
 
        # we will "restore" it as the contact info for the batch
 
        pending = batch.pending_customer
 
        if pending:
 
            batch.contact_name = pending.display_name
 
            batch.phone_number = pending.phone_number
 
            batch.email_address = pending.email_address
 
        else:
 
            batch.contact_name = None
 
            batch.phone_number = None
 
            batch.email_address = None
0 comments (0 inline, 0 general)