From df339cb75ab769c0c64a9b55056ace855c7ac71f Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Sat, 21 Aug 2021 18:50:42 +0200 Subject: [PATCH] Fixed pilerpurge deleting attachments Signed-off-by: Janos SUTO --- util/pilerpurge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/pilerpurge.py b/util/pilerpurge.py index cca0119f..fd6b1f79 100755 --- a/util/pilerpurge.py +++ b/util/pilerpurge.py @@ -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: