fix for invalid winners

This commit is contained in:
James Turk 2012-05-27 20:45:44 -04:00
parent e2cc466305
commit 02b448d554
3 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -82,7 +82,9 @@ class Match(models.Model):
notes = models.TextField(blank=True, default='')
def record_win(self, star, win_type):
self.teams.filter(members__pk=star).update(victorious=True)
team = self.teams.get(members__pk=star)
team.victorious = True
team.save()
self.winner_id = star
self.win_type = win_type
self.save()

View File

@ -92,7 +92,7 @@ event.add_match('cmpunk', 'danielbryan', winner='cmpunk', win_type='pin',
title_at_stake=True)
event.add_match('ryback', 'camacho', winner='ryback', win_type='pin')
event.add_match('john-laurinaitis', 'johncena', 'bigshow',
winner='johnlaurinaitis',
winner='john-laurinaitis',
win_type='pin', notes='Big Show interferes in a big way')
league.score_event(event)