Skip to content

Commit

Permalink
Fix filter_ready_to_publish
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Jul 17, 2024
1 parent 6e829fe commit 3d962f0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions operators/manual_data_entry/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
CHECKPOINT = 'external-mde'

def filter_ready_to_publish(stats: Stats):
def func(row):
if row.get('Status') == 'בייצור':
return True
stats.increase('External Manual Data: Entry not ready to publish')
return False
def func(rows):
for row in rows:
if row.get('Status') == 'בייצור':
yield row
else:
stats.increase('External Manual Data: Entry not ready to publish')
return func

def fetch_google_spreadsheet(stats):
Expand Down

0 comments on commit 3d962f0

Please sign in to comment.