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):
os.remove(muteFilename)
# remove any moderation file
moderationFilename = postFilename + '.moderate'
if os.path.isfile(moderationFilename):
os.remove(moderationFilename)
# remove any votes file
votesFilename = postFilename + '.votes'
if os.path.isfile(votesFilename):
os.remove(votesFilename)
# remove cached html version of the post
cachedPostFilename = \