Skip to content
Snippets Groups Projects
Unverified Commit e98f0f91 authored by Neil Johnson's avatar Neil Johnson Committed by GitHub
Browse files

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
parents 2b918464 73560237
No related branches found
No related tags found
No related merge requests found
...@@ -203,7 +203,8 @@ class RoomListHandler(BaseHandler): ...@@ -203,7 +203,8 @@ class RoomListHandler(BaseHandler):
if limit: if limit:
step = limit + 1 step = limit + 1
else: else:
step = len(rooms_to_scan) # step cannot be zero
step = len(rooms_to_scan) if len(rooms_to_scan) != 0 else 1
chunk = [] chunk = []
for i in xrange(0, len(rooms_to_scan), step): for i in xrange(0, len(rooms_to_scan), step):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment