summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/storage/stats.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py
index 3df57b52ea..3433eef288 100644
--- a/synapse/storage/stats.py
+++ b/synapse/storage/stats.py
@@ -258,6 +258,10 @@ class StatsStore(StateDeltasStore):
                 (i.e. not deltas) of absolute fields.
                 Does not work with per-slice fields.
         """
+
+        if absolute_field_overrides is None:
+            absolute_field_overrides = {}
+
         table, id_col = TYPE_TO_TABLE[stats_type]
 
         quantised_ts = self.quantise_stats_time(int(ts))
@@ -288,9 +292,6 @@ class StatsStore(StateDeltasStore):
             if key not in absolute_field_overrides
         }
 
-        if absolute_field_overrides is None:
-            absolute_field_overrides = {}
-
         if complete_with_stream_id is not None:
             absolute_field_overrides = absolute_field_overrides.copy()
             absolute_field_overrides[