Skip to content

Commit

Permalink
fix(dashboard): update check to see if redis has today's data
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleith committed Dec 10, 2024
1 parent 51b10a9 commit 4fe33b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/main/views/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def aggregate_by_type(notification_data):
todays_data = annual_limit_client.get_all_notification_counts(current_service.id)

# if redis is empty, query the db
if todays_data is None:
if all(value == 0 for value in todays_data.values()):
todays_data = service_api_client.get_service_statistics(service_id, limit_days=1, today_only=False)
annual_data_aggregate = combine_daily_to_annual(todays_data, annual_data, "db")

Expand Down

0 comments on commit 4fe33b9

Please sign in to comment.