diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-11-02 10:00:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 14:00:18 +0000 |
commit | bf69b574226192b946aeaf7a72a39457a3792e41 (patch) | |
tree | 724103391be89b5f1448fc6797fbe9753e4d23c8 /synapse/storage/databases | |
parent | Update changelog (diff) | |
download | synapse-bf69b574226192b946aeaf7a72a39457a3792e41.tar.xz |
Fix "'int' object is not iterable" error in set_device_id_for_pushers background update (#16594)
A regression from removing the cursor_to_dict call, adds back the wrapping into a tuple.
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r-- | synapse/storage/databases/main/pusher.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/pusher.py b/synapse/storage/databases/main/pusher.py index a6a1671bd6..8f36cfce12 100644 --- a/synapse/storage/databases/main/pusher.py +++ b/synapse/storage/databases/main/pusher.py @@ -601,7 +601,7 @@ class PusherBackgroundUpdatesStore(SQLBaseStore): (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 @@ -617,7 +617,7 @@ class PusherBackgroundUpdatesStore(SQLBaseStore): 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, |