Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2023-03-17 10:02:02 +01:00
parent 1766286fc2
commit 8e3e6078a1
3 changed files with 8 additions and 3 deletions

View File

@@ -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"
)

View File

@@ -521,8 +521,10 @@ def deltatimeprint(d): # pragma: no cover
@register.filter
def c2userid(user): # pragma: no cover
c2integration = C2Integration(user)
try:
c2userid = c2integration.get_userid(user)
except NoTokenError:
return 0
return c2userid

Binary file not shown.