summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason Little <realtyem@gmail.com>2024-10-30 19:34:11 -0500
committerGitHub <noreply@github.com>2024-10-30 19:34:11 -0500
commit7987d5e638b3c60494f4695f67bc0000a804f68d (patch)
tree81f94574b26bf925033e8987983b4777185e3db0
parentCheck if user is in room before being able to tag it (#17839) (diff)
downloadsynapse-7987d5e638b3c60494f4695f67bc0000a804f68d.tar.xz
Remove `Generator` in `_quarantine_media_txn()` (#17813)
-rw-r--r--changelog.d/17813.bugfix1
-rw-r--r--synapse/storage/databases/main/room.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/17813.bugfix b/changelog.d/17813.bugfix
new file mode 100644

index 0000000000..5dd276709b --- /dev/null +++ b/changelog.d/17813.bugfix
@@ -0,0 +1 @@ +Avoid lost data on some database query retries. diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py
index e0b7b7e194..33569a4391 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py
@@ -1175,7 +1175,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore): SET quarantined_by = ? WHERE media_origin = ? AND media_id = ? """, - ((quarantined_by, origin, media_id) for origin, media_id in remote_mxcs), + [(quarantined_by, origin, media_id) for origin, media_id in remote_mxcs], ) total_media_quarantined += txn.rowcount if txn.rowcount > 0 else 0