Skip to content

Commit

Permalink
Merge pull request #200 from UKHSA-Internal/ignore_metrics_without_va…
Browse files Browse the repository at this point in the history
…luas_or_change

Don't call plot function if there's no 'values' or 'change'
  • Loading branch information
adebayoolabintan committed Aug 10, 2023
2 parents 9a19e61 + 031dcf0 commit decc495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db_etl_homepage_graphs/grapher.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def get_timeseries(date: str, metric: str):
finally:
session.close()

if not values:
if not (values and change):
return

store_data(
Expand Down Expand Up @@ -275,4 +275,4 @@ def main(payload):


if __name__ == "__main__":
main({"date": "2023-07-27"})
main({"date": "2023-08-10"})

0 comments on commit decc495

Please sign in to comment.