Skip to content

Commit

Permalink
Fix request_by_year
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Jul 16, 2024
1 parent 8680937 commit 8809250
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ def modify_datapackage(dp, *_):


def process_row(row, *_):
amount = row.get('amount_total', 0)
if amount is None:
logging.warning('amount_total is None: %r', row)
amount = 0
amount = row.get('amount_approved') or 0
# Account for relevance
row['score'] = max(1, amount / 1000)
return row
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ by-request-year:
types:
payments:
type: array
es:itemType': object
es:itemType: object
es:index: false

- run: set_types
Expand Down

0 comments on commit 8809250

Please sign in to comment.