Remove votes file if post is deleted

merge-requests/8/head
Bob Mottram 2020-10-06 22:00:53 +01:00
parent 1457e966fe
commit 092be5c5c5
1 changed files with 4 additions and 4 deletions

View File

@ -633,10 +633,10 @@ def deletePost(baseDir: str, httpPrefix: str,
if os.path.isfile(muteFilename): if os.path.isfile(muteFilename):
os.remove(muteFilename) os.remove(muteFilename)
# remove any moderation file # remove any votes file
moderationFilename = postFilename + '.moderate' votesFilename = postFilename + '.votes'
if os.path.isfile(moderationFilename): if os.path.isfile(votesFilename):
os.remove(moderationFilename) os.remove(votesFilename)
# remove cached html version of the post # remove cached html version of the post
cachedPostFilename = \ cachedPostFilename = \