diff options
author | Eric Eastwood <erice@element.io> | 2022-09-21 21:29:35 -0500 |
---|---|---|
committer | Eric Eastwood <erice@element.io> | 2022-09-21 21:29:35 -0500 |
commit | f2a5c70b88a9b284c3f573c461cb7fb86651ef33 (patch) | |
tree | 4fdc2907994259cb3fda60cd9bb7ac32764c31c4 /synapse | |
parent | Add changelog (diff) | |
download | synapse-f2a5c70b88a9b284c3f573c461cb7fb86651ef33.tar.xz |
Assert is not None
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/controllers/persist_events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/controllers/persist_events.py b/synapse/storage/controllers/persist_events.py index 094628ec18..73380e295d 100644 --- a/synapse/storage/controllers/persist_events.py +++ b/synapse/storage/controllers/persist_events.py @@ -433,7 +433,7 @@ class EventsPersistenceStorageController: # We expect events to be persisted by this point and this makes # mypy happy about `stream_ordering` not being optional below - assert event.internal_metadata.stream_ordering + assert event.internal_metadata.stream_ordering is not None # Invalidate related caches after we persist a new event relation = relation_from_event(event) self.main_store._invalidate_caches_for_event( @@ -482,7 +482,7 @@ class EventsPersistenceStorageController: else: # We expect events to be persisted by this point and this makes # mypy happy about `stream_ordering` not being optional below - assert event.internal_metadata.stream_ordering + assert event.internal_metadata.stream_ordering is not None # Invalidate related caches after we persist a new event relation = relation_from_event(event) self.main_store._invalidate_caches_for_event( |