Changeset - 1fea95be97db
[Not reviewed]
0 1 0
Lance Edgar - 5 years ago 2020-03-18 13:15:37
lance@edbob.org
Import `Member.person_uuid` from CORE
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general) First comment
rattail_corepos/importing/corepos/api.py
Show inline comments
 
@@ -485,6 +485,7 @@ class MemberImporter(FromCOREPOSAPI, importing.model.MemberImporter):
 
        'number',
 
        'id',
 
        'customer_uuid',
 
        'person_uuid',
 
        'joined',
 
        'withdrew',
 
    ]
 
@@ -526,6 +527,12 @@ class MemberImporter(FromCOREPOSAPI, importing.model.MemberImporter):
 
                        member['cardNo'], member)
 
            return
 

	
 
        person = customer.first_person()
 
        if not person:
 
            log.warning("Rattail person not found for cardNo %s: %s",
 
                        member['cardNo'], member)
 
            return
 

	
 
        if member['memberStatus'] in self.non_member_status_codes:
 
            log.debug("skipping non-member %s with status '%s': %s",
 
                      member['memberStatus'], member['cardNo'], member)
 
@@ -551,6 +558,7 @@ class MemberImporter(FromCOREPOSAPI, importing.model.MemberImporter):
 
            'number': int(member['cardNo']),
 
            'id': str(member['customerAccountID']),
 
            'customer_uuid': customer.uuid,
 
            'person_uuid': person.uuid,
 
            'joined': joined,
 
            'withdrew': withdrew,
 
        }
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now