Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Apr 2, 2024
1 parent 732fe4d commit 7b0e0d6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion operators/deploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def operator(*_):
source = DF.Flow(
load_from_airtable(settings.AIRTABLE_ALTERNATE_BASE, spec.table, settings.AIRTABLE_VIEW, settings.AIRTABLE_API_KEY),
DF.select_fields([spec.id_field] + select_fields),
).results(onerror=None)[0][0]
).results(on_error=None)[0][0]
source = dict((row[spec.id_field], row) for row in source)

DF.Flow(
Expand Down
2 changes: 1 addition & 1 deletion operators/derive/autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def prepare_locations():
tmpfile.close()
all_places = DF.Flow(
DF.load(tmpfile.name, format='datapackage'),
).results(onerror=None)[0][0]
).results(on_error=None)[0][0]
keys = [n for rec in all_places for n in rec['name']]
mapping = dict((n ,rec['bounds']) for rec in all_places for n in rec['name'])
return keys, mapping
Expand Down
2 changes: 1 addition & 1 deletion operators/derive/manual_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def fetch_aux_table(self, var, table):
var = DF.Flow(
load_from_airtable(settings.AIRTABLE_BASE, table, settings.AIRTABLE_VIEW, settings.AIRTABLE_API_KEY),
DF.select_fields([AIRTABLE_ID_FIELD, 'id']),
).results(onerror=None)[0][0]
).results(on_error=None)[0][0]
logger.info(f'Got {len(var)} {table} records')
var = dict((r['id'], r) for r in var)
return var
Expand Down
4 changes: 2 additions & 2 deletions operators/derive/to_dp.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def card_data_flow():
resources=['situations'],
),
DF.select_fields(['key', 'id', 'name', 'synonyms']),
).results(onerror=None)[0][0]
).results(on_error=None)[0][0]
situations = dict(
(s.pop('key'), s) for s in situations
) | dict(
Expand All @@ -576,7 +576,7 @@ def card_data_flow():
resources=['responses'],
),
DF.select_fields(['key', 'id', 'name', 'synonyms']),
).results(onerror=None)[0][0]
).results(on_error=None)[0][0]
responses = dict(
(r.pop('key'), r) for r in responses
) | dict(
Expand Down
2 changes: 1 addition & 1 deletion operators/derive/to_sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def data_api_sitemap_flow():
DF.concatenate(dict(path=[]), target=dict(name='sitemap', path='sitemap.csv')),
DF.set_type('path', transform=lambda v: v.replace("'", ''').replace('"', '"')),
DF.printer()
).results(onerror=None)[0][0]
).results(on_error=None)[0][0]
today = datetime.date.today().isoformat()
with tempfile.TemporaryDirectory() as tmpdir:
idx = 0
Expand Down

0 comments on commit 7b0e0d6

Please sign in to comment.