Remove etag when post is deleted

main
Bob Mottram 2019-12-04 13:00:34 +00:00
parent 47860b081b
commit 1c2a643522
1 changed files with 3 additions and 0 deletions

View File

@ -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: