Import Member.person_uuid
from CORE
This commit is contained in:
parent
154722b78d
commit
1fea95be97
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue