From 3553101eb31666742d7f3c3480a69637feb81104 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 18 Nov 2014 15:43:17 +0000 Subject: [PATCH] Null check when determining default power levels --- synapse/api/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 635571d2b6..1a8785e890 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -271,7 +271,8 @@ class Auth(object): else: key = (RoomCreateEvent.TYPE, "", ) 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 level