diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-25 14:45:15 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-25 14:45:27 +0100 |
commit | ba87eb675334b22f312849186089a1d53dd0fbb6 (patch) | |
tree | ad3a22f6f5ea6656f853a26fd05097d1580bc948 /synapse/storage | |
parent | BF: Do a pagination when opening a room from an invitation (diff) | |
download | synapse-ba87eb675334b22f312849186089a1d53dd0fbb6.tar.xz |
Fix bug where we tried to insert state events with null state key
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index 66658f6721..1aaef3f493 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -217,7 +217,8 @@ class DataStore(RoomMemberStore, RoomStore, ) raise _RollbackButIsFineException("_persist_event") - if is_new_state and hasattr(event, "state_key"): + is_state = hasattr(event, "state_key") and event.state_key is not None + if is_new_state and is_state: vals = { "event_id": event.event_id, "room_id": event.room_id, |