From f178b456614b28ffa2b097e6adc70a8076b57715 Mon Sep 17 00:00:00 2001 From: MattC Date: Fri, 5 Aug 2022 09:59:15 +1000 Subject: [PATCH] Drop - redundant assert in the "update_room_membership" module API method. EventsWorkerStore.get_event will raise a "NotFoundError" before the assert. --- synapse/module_api/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index 683076c44fd8..e387338d3695 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py @@ -1013,10 +1013,6 @@ async def update_room_membership( # Try to retrieve the resulting event. event = await self._hs.get_datastores().main.get_event(event_id) - # update_membership is supposed to always return after the event has been - # successfully persisted. - assert event is not None - return event async def create_and_send_event_into_room(self, event_dict: JsonDict) -> EventBase: