Use member split_street()
method when exporting to Catapult workbook
This commit is contained in:
parent
8037de7efe
commit
1fe48d91f6
|
@ -161,16 +161,7 @@ class MemberImporter(FromCore, catapult_importing.model.MemberImporter):
|
|||
if info:
|
||||
data['phone_number'] = info.phone
|
||||
data['email'] = info.email
|
||||
|
||||
address = (info.street or '').strip()
|
||||
lines = address.split('\n')
|
||||
data['address_1'] = lines[0].strip() or None
|
||||
if len(lines) > 1:
|
||||
data['address_2'] = lines[1].strip() or None
|
||||
if len(lines) > 2:
|
||||
log.warning("member #%s has %s address lines: %s",
|
||||
custdata.card_number, len(lines), custdata)
|
||||
|
||||
data['address_1'], data['address_2'] = info.split_street()
|
||||
data['city'] = info.city
|
||||
data['state'] = info.state
|
||||
data['zip_code'] = info.zip
|
||||
|
|
Loading…
Reference in a new issue