summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/stats.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py
index 1f39ef211a..ff266b09b0 100644
--- a/synapse/storage/stats.py
+++ b/synapse/storage/stats.py
@@ -340,7 +340,8 @@ class StatsStore(StateDeltasStore):
             "avatar",
             "canonical_alias"
         ):
-            if "\0" in fields.get(col, ""):
+            field = fields.get(col)
+            if field and "\0" in field:
                 fields[col] = None
 
         return self._simple_upsert(