mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-27 12:08:32 +03:00
Null check when determining default power levels
This commit is contained in:
parent
b01dd76be1
commit
3553101eb3
1 changed files with 2 additions and 1 deletions
|
@ -271,7 +271,8 @@ class Auth(object):
|
||||||
else:
|
else:
|
||||||
key = (RoomCreateEvent.TYPE, "", )
|
key = (RoomCreateEvent.TYPE, "", )
|
||||||
create_event = event.old_state_events.get(key)
|
create_event = event.old_state_events.get(key)
|
||||||
if create_event.content["creator"] == user_id:
|
if (create_event is not None and
|
||||||
|
create_event.content["creator"] == user_id):
|
||||||
return 100
|
return 100
|
||||||
|
|
||||||
return level
|
return level
|
||||||
|
|
Loading…
Reference in a new issue