summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-17 09:39:12 +0100
committerErik Johnston <erik@matrix.org>2015-08-17 09:39:45 +0100
commitf9d4da7f4502aeefe7a5a6a9ec0d2682458e7834 (patch)
tree01d840cbaed99a41cdee4d2e179a76bdd27e4d2c
parentMerge pull request #221 from matrix-org/auth (diff)
downloadsynapse-f9d4da7f4502aeefe7a5a6a9ec0d2682458e7834.tar.xz
Fix bug where we were leaking None into state event lists
-rw-r--r--synapse/storage/state.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index 185f88fd7c..ecb62e6dfd 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -412,9 +412,10 @@ class StateStore(SQLBaseStore):
                 full=(types is None),
             )
 
-            results[group].update({
+            # We replace here to remove all the entries with None values.
+            results[group] = {
                 key: value for key, value in state_dict.items() if value
-            })
+            }
 
         defer.returnValue(results)