diff options
author | David Robertson <davidr@element.io> | 2023-12-05 12:06:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 12:06:21 +0000 |
commit | 0a00c99823818228479f9fdb8c77e61a49a65e18 (patch) | |
tree | 66557d4b4d5939b2f0757a1ced380d4bc2f19381 /synapse/handlers/room.py | |
parent | Add how to validate configuration file with synapse.config script (#16714) (diff) | |
download | synapse-0a00c99823818228479f9fdb8c77e61a49a65e18.tar.xz |
Fix upgrading a room without `events` field in power levels (#16725)
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 2 |
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, |