no title change on dq & fix end date on reigns
This commit is contained in:
parent
6676164462
commit
e004c4daa8
@ -40,7 +40,7 @@ class Star(models.Model):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# end current title reigns
|
# end current title reigns
|
||||||
TitleReign.objects.filter(title=title).update(end_date=date)
|
TitleReign.objects.filter(title=title, end_date=None).update(end_date=date)
|
||||||
self.reigns.create(title=title, begin_date=date)
|
self.reigns.create(title=title, begin_date=date)
|
||||||
if tag_partner:
|
if tag_partner:
|
||||||
if title != 'tag':
|
if title != 'tag':
|
||||||
@ -59,7 +59,7 @@ class Star(models.Model):
|
|||||||
elif len(current_title) == 1:
|
elif len(current_title) == 1:
|
||||||
return current_title[0].title
|
return current_title[0].title
|
||||||
else:
|
else:
|
||||||
return 'multiple' # FIXME
|
return 'multiple titles: ' + '&'.join(t.title for t in current_title)
|
||||||
|
|
||||||
def titled_name(self, date):
|
def titled_name(self, date):
|
||||||
title = self.has_title(date)
|
title = self.has_title(date)
|
||||||
@ -170,7 +170,7 @@ class Match(models.Model):
|
|||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
def do_title_change(self):
|
def do_title_change(self):
|
||||||
if self.title_at_stake:
|
if self.title_at_stake and self.outcome != 'dq':
|
||||||
victors = list(self.teams.get(victorious=True).members.all())
|
victors = list(self.teams.get(victorious=True).members.all())
|
||||||
if len(victors) == 1:
|
if len(victors) == 1:
|
||||||
victors[0].win_title(self.title_at_stake, self.event.date)
|
victors[0].win_title(self.title_at_stake, self.event.date)
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<footer>
|
<footer>
|
||||||
<p>© James Erin 2012</p>
|
<p>© James & Erin 2012</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
|
Loading…
Reference in New Issue
Block a user