fix for invalid winners
This commit is contained in:
parent
e2cc466305
commit
02b448d554
File diff suppressed because one or more lines are too long
@ -82,7 +82,9 @@ class Match(models.Model):
|
|||||||
notes = models.TextField(blank=True, default='')
|
notes = models.TextField(blank=True, default='')
|
||||||
|
|
||||||
def record_win(self, star, win_type):
|
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.winner_id = star
|
||||||
self.win_type = win_type
|
self.win_type = win_type
|
||||||
self.save()
|
self.save()
|
||||||
|
@ -92,7 +92,7 @@ event.add_match('cmpunk', 'danielbryan', winner='cmpunk', win_type='pin',
|
|||||||
title_at_stake=True)
|
title_at_stake=True)
|
||||||
event.add_match('ryback', 'camacho', winner='ryback', win_type='pin')
|
event.add_match('ryback', 'camacho', winner='ryback', win_type='pin')
|
||||||
event.add_match('john-laurinaitis', 'johncena', 'bigshow',
|
event.add_match('john-laurinaitis', 'johncena', 'bigshow',
|
||||||
winner='johnlaurinaitis',
|
winner='john-laurinaitis',
|
||||||
win_type='pin', notes='Big Show interferes in a big way')
|
win_type='pin', notes='Big Show interferes in a big way')
|
||||||
league.score_event(event)
|
league.score_event(event)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user