Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
do_increment_logging_stat: Assert that .frequency is either DAY or HOUR.
Mateusz Mandera21c94953c857
diff --git a/analytics/lib/counts.py b/analytics/lib/counts.pyindex 6e616535ebd..c61137be8d9 100644--- a/analytics/lib/counts.py+++ b/analytics/lib/counts.py@@ -315,8 +315,10 @@ def do_increment_logging_stat(if stat.frequency == CountStat.DAY:end_time = ceiling_to_day(event_time)- else: # CountStat.HOUR:+ elif stat.frequency == CountStat.HOUR:end_time = ceiling_to_hour(event_time)+ else:+ raise AssertionError("Unsupported CountStat frequency")row, created = table._default_manager.get_or_create(property=stat.property,