Do not return in a deferred function
parent
c433f61091
commit
277e50462d
|
@ -453,16 +453,16 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
|
||||||
|
|
||||||
# If we can't find the create event, assume we've hit a dead end
|
# If we can't find the create event, assume we've hit a dead end
|
||||||
if not create_id:
|
if not create_id:
|
||||||
return None
|
defer.returnValue(None)
|
||||||
|
|
||||||
# Retrieve the room's create event
|
# Retrieve the room's create event
|
||||||
create_event = yield self.get_event(create_id)
|
create_event = yield self.get_event(create_id)
|
||||||
|
|
||||||
if not create_event:
|
if not create_event:
|
||||||
return None
|
defer.returnValue(None)
|
||||||
|
|
||||||
# Return predecessor if present
|
# 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)
|
@cached(max_entries=100000, iterable=True)
|
||||||
def get_current_state_ids(self, room_id):
|
def get_current_state_ids(self, room_id):
|
||||||
|
|
Loading…
Reference in New Issue