Kaynağa Gözat

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.
tags/v1.96.0
Patrick Cloke 6 ay önce
committed by GitHub
ebeveyn
işleme
bf69b57422
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. +1
    -0
      changelog.d/16594.bugfix
  2. +2
    -2
      synapse/storage/databases/main/pusher.py

+ 1
- 0
changelog.d/16594.bugfix Dosyayı Görüntüle

@@ -0,0 +1 @@
Fix "'int' object is not iterable" error in `set_device_id_for_pushers` background update introduced in Synapse 1.95.0.

+ 2
- 2
synapse/storage/databases/main/pusher.py Dosyayı Görüntüle

@@ -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,


Yükleniyor…
İptal
Kaydet