mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix bug when generating a key when get_room_events_stream returned zero rows
This commit is contained in:
parent
86be66c34e
commit
cd2967d271
@ -89,10 +89,14 @@ class StreamStore(SQLBaseStore):
|
|||||||
|
|
||||||
ret = [self._parse_event_from_row(r) for r in rows]
|
ret = [self._parse_event_from_row(r) for r in rows]
|
||||||
|
|
||||||
|
|
||||||
|
if rows:
|
||||||
if from_key < to_key:
|
if from_key < to_key:
|
||||||
key = max([r["ordering"] for r in rows])
|
key = max([r["ordering"] for r in rows])
|
||||||
else:
|
else:
|
||||||
key = min([r["ordering"] for r in rows])
|
key = min([r["ordering"] for r in rows])
|
||||||
|
else:
|
||||||
|
key = to_key
|
||||||
|
|
||||||
defer.returnValue((ret, key))
|
defer.returnValue((ret, key))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user