From 364166d84b99ff5732691626e4eb72619de1d433 Mon Sep 17 00:00:00 2001 From: Martin Bley Date: Wed, 24 Feb 2016 16:00:34 +0100 Subject: [PATCH] Fixed 'None' items in mate table --- tipp/views.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tipp/views.py b/tipp/views.py index a629a81..e64bd89 100644 --- a/tipp/views.py +++ b/tipp/views.py @@ -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: