Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai committed Dec 19, 2024
1 parent c1cdbea commit 72feee5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/service/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,10 @@ def get_monthly_notification_stats(service_id):
statistics.add_monthly_notification_status_stats(data, stats)

now = datetime.now(timezone.utc)
# end_date doesn't have tzinfo, so we need to remove it from now
end_date_now = now.replace(tzinfo=None)
# TODO FF_ANNUAL_LIMIT removal
if not current_app.config["FF_ANNUAL_LIMIT"] and end_date > now:
if not current_app.config["FF_ANNUAL_LIMIT"] and end_date > end_date_now:
todays_deltas = fetch_notification_status_for_service_for_day(now, service_id=service_id)
statistics.add_monthly_notification_status_stats(data, todays_deltas)

Expand Down

0 comments on commit 72feee5

Please sign in to comment.