diff --git a/webinterface.py b/webinterface.py index 8249d048c..217f5d7c3 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1893,9 +1893,11 @@ def insertQuestion(baseDir: str,translate: {}, \ continue if not questionOption.get('replies'): continue - if not questionOption['replies'].get('totalItems'): - continue - votes=int(questionOption['replies']['totalItems']) + votes=0 + try: + votes=int(questionOption['replies']['totalItems']) + except: + pass if votes>maxVotes: maxVotes=int(votes+1) @@ -1906,9 +1908,11 @@ def insertQuestion(baseDir: str,translate: {}, \ continue if not questionOption.get('replies'): continue - if not questionOption['replies'].get('totalItems'): - continue - votes=int(questionOption['replies']['totalItems']) + votes=0 + try: + votes=int(questionOption['replies']['totalItems']) + except: + pass votesPercent=str(int(votes*100/maxVotes)) content+='
' content+='
'