bug fix
This commit is contained in:
@@ -245,7 +245,10 @@ class Result(models.Model):
|
||||
"Cannot have the same crew more than one time in a race"
|
||||
)
|
||||
if len(athletes) != len(set(athletes)):
|
||||
print([item for item, count in collections.Counter(athletes).items() if count>1])
|
||||
print('')
|
||||
res = [item for item, count in collections.Counter(athletes).items() if count>1]
|
||||
for id in res:
|
||||
print(Athlete.objects.get(id=id))
|
||||
raise ValidationError(
|
||||
"Cannot have the same athlete in different crews in a race"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user