From 1fe48d91f6b037392d8d6068b6962fc6df713274 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 21 Jul 2020 15:07:54 -0500 Subject: [PATCH] Use member `split_street()` method when exporting to Catapult workbook --- .../importing/db/exporters/catapult_membership.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/rattail_corepos/corepos/importing/db/exporters/catapult_membership.py b/rattail_corepos/corepos/importing/db/exporters/catapult_membership.py index 36c4cdb..d54bb1f 100644 --- a/rattail_corepos/corepos/importing/db/exporters/catapult_membership.py +++ b/rattail_corepos/corepos/importing/db/exporters/catapult_membership.py @@ -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