Skip to content

Commit

Permalink
handle REDIS_ENABLED False in dashboard code
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed Nov 26, 2024
1 parent a2bb8ae commit 17fa158
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 @@ -279,7 +279,7 @@ def aggregate_by_type(notification_data):
monthly_data = service_api_client.get_monthly_notification_stats(service_id, year)
annual_data = aggregate_by_type(monthly_data)

todays_data = annual_limit_client.get_all_notification_counts(current_service.id)
todays_data = annual_limit_client.get_all_notification_counts(current_service.id) if current_app.config["REDIS_ENABLED"] else None

# if redis is empty, query the db
if todays_data is None:
Expand Down

0 comments on commit 17fa158

Please sign in to comment.