Skip to content

Commit

Permalink
Remove Generator in _quarantine_media_txn() (#17813)
Browse files Browse the repository at this point in the history
  • Loading branch information
realtyem authored Oct 31, 2024
1 parent 3ae80b0 commit 7987d5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/17813.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid lost data on some database query retries.
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ def _quarantine_media_txn(
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

Expand Down

0 comments on commit 7987d5e

Please sign in to comment.