diff options
author | Neil Johnson <neil@ly.st> | 2018-01-26 20:22:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 20:22:40 +0000 |
commit | e98f0f911277a31c006a98c01a2c9a73ff38e447 (patch) | |
tree | db517bc7ca9026e6347a8632f3043f4b37ea9d13 /synapse | |
parent | Remove spurious unittest.DEBUG (diff) | |
parent | add white space line (diff) | |
download | synapse-e98f0f911277a31c006a98c01a2c9a73ff38e447.tar.xz |
Merge pull request #2827 from matrix-org/fix_server_500_on_public_rooms_call_when_no_rooms_exist
Fix server 500 on public rooms call when no rooms exist
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/room_list.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py index bb40075387..dfa09141ed 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py @@ -203,7 +203,8 @@ class RoomListHandler(BaseHandler): if limit: step = limit + 1 else: - step = len(rooms_to_scan) + # step cannot be zero + step = len(rooms_to_scan) if len(rooms_to_scan) != 0 else 1 chunk = [] for i in xrange(0, len(rooms_to_scan), step): |