Use member split_street() method when exporting to Catapult workbook

This commit is contained in:
Lance Edgar 2020-07-21 15:07:54 -05:00
parent 8037de7efe
commit 1fe48d91f6

View file

@ -161,16 +161,7 @@ class MemberImporter(FromCore, catapult_importing.model.MemberImporter):
if info: if info:
data['phone_number'] = info.phone data['phone_number'] = info.phone
data['email'] = info.email data['email'] = info.email
data['address_1'], data['address_2'] = info.split_street()
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['city'] = info.city data['city'] = info.city
data['state'] = info.state data['state'] = info.state
data['zip_code'] = info.zip data['zip_code'] = info.zip