summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-03 17:42:52 +0100
committerErik Johnston <erik@matrix.org>2019-06-03 17:42:52 +0100
commit0a56966f7d4879f9d517c96a3c714accdce4e17f (patch)
treec7f98a8ebb3c7475cc6936febf834429d1571f57
parentNewsfile (diff)
downloadsynapse-0a56966f7d4879f9d517c96a3c714accdce4e17f.tar.xz
Fix
-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(