From ea06882aff669e665019713057e194245c3b36c0 Mon Sep 17 00:00:00 2001 From: James Turk Date: Sun, 15 Jul 2012 20:57:59 -0400 Subject: [PATCH] fix calculation of wwe title --- fowl/game/views.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fowl/game/views.py b/fowl/game/views.py index fd44281..2948105 100644 --- a/fowl/game/views.py +++ b/fowl/game/views.py @@ -143,11 +143,12 @@ def league(request, league_id): # do WWE belt check on PPVs if belt_name == 'world': belt_name = 'wwe' - if belts[belt_name]['teams'][ew] > belts[belt_name]['points']: - belts[belt_name]['points'] = belts[belt_name]['teams'][ew] - if belts[belt_name]['name'] != ew: - belts[belt_name]['name'] = ew - belts[belt_name]['date'] = event.date + for team in teams: + if belts[belt_name]['teams'][team] > belts[belt_name]['points']: + belts[belt_name]['points'] = belts[belt_name]['teams'][team] + if belts[belt_name]['name'] != team: + belts[belt_name]['name'] = team + belts[belt_name]['date'] = event.date context = { 'view': 'league',