Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Jan 30, 2025
1 parent 8b95806 commit 3b9745d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -1709,15 +1709,15 @@ async def _populate_participant(self, progress: JsonDict, batch_size: int) -> in
"""
stream_token = progress.get("last_stream_token", None)

def _get_max_stream_token_txn(txn: LoggingTransaction) -> Optional[int]:
def _get_max_stream_token_txn(txn: LoggingTransaction) -> int:
sql = """
SELECT event_stream_ordering from room_memberships
ORDER BY event_stream_ordering DESC
LIMIT 1;
"""
txn.execute(sql)
res = txn.fetchone()
if not res[0]:
if not res or not res[0]:
return 0
return res[0]

Expand Down

0 comments on commit 3b9745d

Please sign in to comment.