summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-05 15:43:39 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-24 10:42:00 +0100
commitceec7960bcaecc9cb8bb75ef4d5332f68f69aacb (patch)
treea91d018e64cf6b001dbd5e824bf1e93d8c6f7809
parentPredicate it on TYPE_CHECKING (not that it improves things) (diff)
downloadsynapse-ceec7960bcaecc9cb8bb75ef4d5332f68f69aacb.tar.xz
Fix type error
-rw-r--r--synapse/storage/state.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index eb9fbb8109..8c072886b2 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -109,7 +109,10 @@ class StateFilter:
             type_dict.setdefault(typ, set()).add(s)  # type: ignore
 
         return StateFilter(
-            types=frozendict((k, frozenset(v)) for k, v in type_dict.items())
+            types=frozendict(
+                (k, frozenset(v) if v is not None else None)
+                for k, v in type_dict.items()
+            )
         )
 
     @staticmethod