|
|
|
@ -8,7 +8,7 @@ class TeamScore(models.Model): |
|
|
|
team_registration = models.ForeignKey(TeamRegistration, on_delete=models.CASCADE, null=True, blank=True) |
|
|
|
team_registration = models.ForeignKey(TeamRegistration, on_delete=models.CASCADE, null=True, blank=True) |
|
|
|
player_registrations = models.ManyToManyField(PlayerRegistration, blank=True) |
|
|
|
player_registrations = models.ManyToManyField(PlayerRegistration, blank=True) |
|
|
|
score = models.CharField(max_length=50, null=True, blank=True) |
|
|
|
score = models.CharField(max_length=50, null=True, blank=True) |
|
|
|
walk_out = models.IntegerField(null=True, blank=True) #id, int of the walked_out team |
|
|
|
walk_out = models.IntegerField(null=True, blank=True) # TODO type of WO: forfeit, injury... |
|
|
|
lucky_loser = models.BooleanField() |
|
|
|
lucky_loser = models.BooleanField() |
|
|
|
|
|
|
|
|
|
|
|
def __str__(self): |
|
|
|
def __str__(self): |
|
|
|
@ -40,9 +40,3 @@ class TeamScore(models.Model): |
|
|
|
return [x for x in self.score.split(',')] |
|
|
|
return [x for x in self.score.split(',')] |
|
|
|
else: |
|
|
|
else: |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
# scores = [] |
|
|
|
|
|
|
|
# if self.score: |
|
|
|
|
|
|
|
# scores = [x for x in self.score.split(',')] |
|
|
|
|
|
|
|
# if self.walk_out == 1: |
|
|
|
|
|
|
|
# scores.insert(0, 'WO') |
|
|
|
|
|
|
|
# return scores |
|
|
|
|
|
|
|
|