From 1c2a643522a331a01ba42df58fd35ec988598727 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 4 Dec 2019 13:00:34 +0000 Subject: [PATCH] Remove etag when post is deleted --- utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils.py b/utils.py index 5d10911e..15e27b56 100644 --- a/utils.py +++ b/utils.py @@ -277,6 +277,9 @@ def removeAttachment(baseDir: str,httpPrefix: str,domain: str,postJson: {}): mediaFilename=baseDir+'/'+attachmentUrl.replace(httpPrefix+'://'+domain+'/','') if os.path.isfile(mediaFilename): os.remove(mediaFilename) + etagFilename=mediaFilename+'.etag' + if os.path.isfile(etagFilename): + os.remove(etagFilename) postJson['attachment']=[] def removeModerationPostFromIndex(baseDir: str,postUrl: str,debug: bool) -> None: