summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-01-22 12:40:26 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2019-01-22 12:40:26 +0000
commit277e50462d1422ac8cfe2df7cd2213288f3d14c5 (patch)
treee191c710073f5787802356051a45a8582a1bd000 /synapse/storage/state.py
parentEnsure new filter is actually created (diff)
downloadsynapse-277e50462d1422ac8cfe2df7cd2213288f3d14c5.tar.xz
Do not return in a deferred function
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r--synapse/storage/state.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index 981d1e3600..fceb9744aa 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -453,16 +453,16 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
 
         # If we can't find the create event, assume we've hit a dead end
         if not create_id:
-            return None
+            defer.returnValue(None)
 
         # Retrieve the room's create event
         create_event = yield self.get_event(create_id)
 
         if not create_event:
-            return None
+            defer.returnValue(None)
 
         # Return predecessor if present
-        return create_event.content.get("predecessor", None)
+        defer.returnValue(create_event.content.get("predecessor", None))
 
     @cached(max_entries=100000, iterable=True)
     def get_current_state_ids(self, room_id):