Checking questions file

main
Bob Mottram 2019-11-26 20:22:52 +00:00
parent 84bee5201a
commit 62c71d03c9
1 changed files with 7 additions and 2 deletions

View File

@ -1796,7 +1796,12 @@ def insertQuestion(baseDir: str,translate: {}, \
votesFilename= \
baseDir+'/accounts/'+nickname+'@'+domain+'/questions.txt'
showQuestion=True
if os.path.isfile(votesFilename):
if messageId not in open(votesFilename).read():
showQuestion=False
if showQuestion:
# show the question options
content+='<div class="question">'
content+='<form method="POST" action="/users/'+nickname+'/question'+pageNumberStr+'">'