Fixed pilerpurge deleting attachments

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2021-08-21 18:50:42 +02:00
parent 694aa107c2
commit df339cb75a

View File

@ -85,7 +85,7 @@ def purge_attachments_by_attachment_id(opts={}):
cursor = opts['db'].cursor()
cursor.execute("SELECT i, piler_id, attachment_id, refcount FROM " +
"v_attachment WHERE i IN (%s)" %
"v_attachment WHERE refcount=0 AND i IN (%s)" %
(format), opts['referenced_attachments'])
while True: