summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2022-06-07 12:28:08 +0100
committerGitHub <noreply@github.com>2022-06-07 11:28:08 +0000
commitc51f5b9592a8f7e44c132e7e63b96f0af34dfef3 (patch)
treebf14ac1418e4dbd4c201f2d2634335791f6f18ec /synapse
parentPrevent local quarantined media from being claimed by media retention (#12972) (diff)
downloadsynapse-c51f5b9592a8f7e44c132e7e63b96f0af34dfef3.tar.xz
Prevent breaking old sqlite's when media retention is enabled (#12977)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/databases/main/media_repository.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/media_repository.py b/synapse/storage/databases/main/media_repository.py
index 3c585c555a..d028be16de 100644
--- a/synapse/storage/databases/main/media_repository.py
+++ b/synapse/storage/databases/main/media_repository.py
@@ -327,7 +327,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
         if include_protected_media is False:
             # Do not include media that has been protected from quarantine
             sql += """
-                AND safe_from_quarantine = false
+                AND NOT safe_from_quarantine
             """
 
         def _get_local_media_ids_txn(txn: LoggingTransaction) -> List[str]: