Fixed 'None' items in mate table

This commit is contained in:
2016-02-24 16:00:34 +01:00
parent de904d4ad4
commit 364166d84b

View File

@@ -331,7 +331,13 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
try:
matetipp = Tipp.objects.get(tipperID=mate['mate'],matchID=match.matchID)
if match_started is True:
mate['tipps'].append(str(matetipp.pointsTeam1) + ":" + str(matetipp.pointsTeam2) + "(" + str(matetipp.score) + ")")
if matetipp.score is None:
score = u'\u231B'
else:
score = matetipp.score
mate['tipps'].append(str(matetipp.pointsTeam1) + ":" + str(matetipp.pointsTeam2) + \
"(" + str(score) + ")")
if match.finished is True:
mate['sum_score'] += matetipp.score
else: