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"
|
"Cannot have the same crew more than one time in a race"
|
||||||
)
|
)
|
||||||
if len(athletes) != len(set(athletes)):
|
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(
|
raise ValidationError(
|
||||||
"Cannot have the same athlete in different crews in a race"
|
"Cannot have the same athlete in different crews in a race"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -521,8 +521,10 @@ def deltatimeprint(d): # pragma: no cover
|
|||||||
@register.filter
|
@register.filter
|
||||||
def c2userid(user): # pragma: no cover
|
def c2userid(user): # pragma: no cover
|
||||||
c2integration = C2Integration(user)
|
c2integration = C2Integration(user)
|
||||||
|
try:
|
||||||
c2userid = c2integration.get_userid(user)
|
c2userid = c2integration.get_userid(user)
|
||||||
|
except NoTokenError:
|
||||||
|
return 0
|
||||||
|
|
||||||
return c2userid
|
return c2userid
|
||||||
|
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user