From 6eb3edec473899f9145124d33a85b153e4a0cda9 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 5 Apr 2023 13:49:15 +0200 Subject: [PATCH] Fix the 'set_device_id_for_pushers_txn' background update. (#15391) Refer to the correct field from the response when updating the background update progress. --- changelog.d/15391.bugfix | 1 + synapse/storage/databases/main/pusher.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/15391.bugfix diff --git a/changelog.d/15391.bugfix b/changelog.d/15391.bugfix new file mode 100644 index 0000000000..22b3bfe668 --- /dev/null +++ b/changelog.d/15391.bugfix @@ -0,0 +1 @@ +Fix the `set_device_id_for_pushers_txn` background update crash. diff --git a/synapse/storage/databases/main/pusher.py b/synapse/storage/databases/main/pusher.py index aeb6034f46..87e28e22d3 100644 --- a/synapse/storage/databases/main/pusher.py +++ b/synapse/storage/databases/main/pusher.py @@ -562,7 +562,7 @@ class PusherBackgroundUpdatesStore(SQLBaseStore): ) self.db_pool.updates._background_update_progress_txn( - txn, "set_device_id_for_pushers", {"pusher_id": rows[-1]["id"]} + txn, "set_device_id_for_pushers", {"pusher_id": rows[-1]["pusher_id"]} ) return len(rows)