Skip to content

Commit

Permalink
Finish removing manual_short_name, fix for external data
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Sep 22, 2024
1 parent ce9fcfd commit 45dff23
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
9 changes: 0 additions & 9 deletions operators/deploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ class DeploySpec:
'id', ['synonyms'], add_missing=True),
DeploySpec(settings.AIRTABLE_RESPONSE_TABLE,
'id', ['synonyms'], add_missing=True),
# Organization Short Names and Situations
DeploySpec(settings.AIRTABLE_ORGANIZATION_TABLE,
'id', ['short_name', 'manual_short_name', 'situation_ids:situations']),
# Home Page Layout
# DeploySpec(settings.AIRTABLE_HOMEPAGE_TABLE,
# 'id', ['group', 'title', 'group_link', 'situation_id:situation', 'response_id:response'], add_missing=True),
# Service Manual Tagging
# DeploySpec(settings.AIRTABLE_SERVICE_TABLE,
# 'id', ['name_manual']),
# Manual Location Geo-Tagging
DeploySpec(settings.AIRTABLE_LOCATION_TABLE,
'id', ['status', 'provider', 'accuracy',
Expand Down
2 changes: 0 additions & 2 deletions operators/derive/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ def preprocess_organizations(select_fields=None, validate=False):
get_stats().filter_with_stat('Processing: Organizations: No Name', lambda r: bool(r.get('name')), resources=['organizations']),
set_staging_pkey('organizations'),
DF.set_type('urls', type='array', transform=transform_urls, resources=['organizations']),
DF.set_type('short_name', transform=lambda v, row: row.get('manual_short_name') or v, resources=['organizations']),
DF.delete_fields(['manual_short_name'], resources=['organizations']),
DF.set_type(
'phone_numbers',
type='array',
Expand Down
2 changes: 1 addition & 1 deletion operators/manual_data_entry/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def func(rows):
for service in services:
emit = dict()
emit['Status'] = 'בייצור'
emit['Branch Address'] = service['כתובת או שם ישוב בו מסופק השירות'] or row['Branch Address']
emit['Branch Address'] = service['כתובת או שם ישוב בו מסופק השירות'] or row.get('Branch Address')
emit['Branch Details'] = None
emit['Branch Geocode'] = None
emit['Branch Email'] = None
Expand Down

0 comments on commit 45dff23

Please sign in to comment.