summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/storage/stats.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py
index 7959f5785b..c950ab9953 100644
--- a/synapse/storage/stats.py
+++ b/synapse/storage/stats.py
@@ -190,8 +190,7 @@ class StatsStore(StateDeltasStore):
             else:
                 for (key, val) in additive_relatives.items():
                     current_row[key] += val
-                for (key, val) in absolutes.items():
-                    current_row[key] = val
+                current_row.update(absolutes)
                 self._simple_update_one_txn(txn, table, keyvalues, current_row)
 
     def _upsert_copy_from_table_with_additive_relatives_txn(
@@ -223,8 +222,8 @@ class StatsStore(StateDeltasStore):
             ins_columns = chain(
                 keyvalues,
                 copy_columns,
-                additive_relatives.keys(),
-                extra_dst_keyvalues.keys(),
+                additive_relatives,
+                extra_dst_keyvalues,
             )
             sel_exprs = chain(
                 keyvalues,