Small fixes in migrate.py
This commit is contained in:
@ -226,7 +226,7 @@ def migrate_branches(in_dir: str, out_dir: str) -> None:
|
||||
with open(f'{out_dir}/branch.csv', 'w+') as f:
|
||||
f.write('zwstid;name;country;postal_dest;address;phone_nr\n')
|
||||
for b in csv.parse(f'{in_dir}/TZweigstellen.csv'):
|
||||
BRANCH_MAP[b['ZNR']] = b['Kennbst']
|
||||
BRANCH_MAP[b['ZNR']] = b['Kennbst'].strip().title()
|
||||
address = b['Straße']
|
||||
postal_dest = lookup_plz(int(b['PLZ']) if b['PLZ'] else None, b['Ort'], address)
|
||||
f.write(csv.format_row(b['Kennbst'], b['Name'], 'AT', postal_dest, address, b['Telefon']))
|
||||
@ -491,6 +491,7 @@ def migrate_members(in_dir: str, out_dir: str) -> None:
|
||||
invalid(mgnr, 'Tel.Nr.', m['Mobiltelefon'])
|
||||
else:
|
||||
if phone_2[3] == '6':
|
||||
if phone_2 not in phone_mobile:
|
||||
phone_mobile.append(phone_2)
|
||||
elif phone_landline is None:
|
||||
phone_landline = phone_2
|
||||
|
Reference in New Issue
Block a user