Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Properly pass tuples into simple_update_many_txn.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Nov 2, 2023
1 parent cfb6d38 commit d8b1fcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def set_device_id_for_pushers_txn(txn: LoggingTransaction) -> int:
(last_pusher_id, batch_size),
)

rows = txn.fetchall()
rows = cast(List[Tuple[int, Optional[str], Optional[str]]], txn.fetchall())
if len(rows) == 0:
return 0

Expand All @@ -617,7 +617,7 @@ def set_device_id_for_pushers_txn(txn: LoggingTransaction) -> int:
txn=txn,
table="pushers",
key_names=("id",),
key_values=[row[0] for row in rows],
key_values=[(row[0],) for row in rows],
value_names=("device_id", "access_token"),
# If there was already a device_id on the pusher, we only want to clear
# the access_token column, so we keep the existing device_id. Otherwise,
Expand Down

0 comments on commit d8b1fcd

Please sign in to comment.