summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-12-05 12:06:21 +0000
committerGitHub <noreply@github.com>2023-12-05 12:06:21 +0000
commit0a00c99823818228479f9fdb8c77e61a49a65e18 (patch)
tree66557d4b4d5939b2f0757a1ced380d4bc2f19381 /synapse
parentAdd how to validate configuration file with synapse.config script (#16714) (diff)
downloadsynapse-0a00c99823818228479f9fdb8c77e61a49a65e18.tar.xz
Fix upgrading a room without `events` field in power levels (#16725)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index f865bed1ec..2823ca6f0d 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -549,7 +549,7 @@ class RoomCreationHandler:
         except (TypeError, ValueError):
             ban = 50
         needed_power_level = max(
-            state_default_int, ban, max(event_power_levels.values())
+            state_default_int, ban, max(event_power_levels.values(), default=0)
         )
 
         # Get the user's current power level, this matches the logic in get_user_power_level,