Changeset 1fe48d9 in rattail-corepos


Ignore:
Timestamp:
07/21/2020 03:07:54 PM (3 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
6dbf7cf
Parents:
8037de7
Message:

Use member split_street() method when exporting to Catapult workbook

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rattail_corepos/corepos/importing/db/exporters/catapult_membership.py

    r8037de7 r1fe48d9  
    162162            data['phone_number'] = info.phone
    163163            data['email'] = info.email
    164 
    165             address = (info.street or '').strip()
    166             lines = address.split('\n')
    167             data['address_1'] = lines[0].strip() or None
    168             if len(lines) > 1:
    169                 data['address_2'] = lines[1].strip() or None
    170                 if len(lines) > 2:
    171                     log.warning("member #%s has %s address lines: %s",
    172                                 custdata.card_number, len(lines), custdata)
    173 
     164            data['address_1'], data['address_2'] = info.split_street()
    174165            data['city'] = info.city
    175166            data['state'] = info.state
Note: See TracChangeset for help on using the changeset viewer.