fix bug race registration
This commit is contained in:
@@ -135,7 +135,6 @@ def garmin_getworkout(garminid,r,activity):
|
|||||||
offset = activity['startTimeOffsetInSeconds']
|
offset = activity['startTimeOffsetInSeconds']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
offset = 0
|
offset = 0
|
||||||
print(offset)
|
|
||||||
durationseconds = activity['durationInSeconds']
|
durationseconds = activity['durationInSeconds']
|
||||||
duration = dataprep.totaltime_sec_to_string(durationseconds)
|
duration = dataprep.totaltime_sec_to_string(durationseconds)
|
||||||
activitytype = activity['activityType']
|
activitytype = activity['activityType']
|
||||||
|
|||||||
@@ -1639,6 +1639,7 @@ def add_workout_race(ws,race,r,splitsecond=0,recordid=0,doregister=False):
|
|||||||
entrycategory=initialcategory,
|
entrycategory=initialcategory,
|
||||||
)
|
)
|
||||||
record.save()
|
record.save()
|
||||||
|
add_rower_race(r,race)
|
||||||
else:
|
else:
|
||||||
errors.append("Unable to find a suitable start category")
|
errors.append("Unable to find a suitable start category")
|
||||||
return result,comments,errors,0
|
return result,comments,errors,0
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class GarminObjects(DjangoTestCase):
|
|||||||
self.assertEqual(len(data),2)
|
self.assertEqual(len(data),2)
|
||||||
|
|
||||||
def test_garmin_deregistration(self):
|
def test_garmin_deregistration(self):
|
||||||
data = {"userAccessToken":"dfdzf"}
|
data = {"deregistrations":[{"userAccessToken":"dfdzf"}]}
|
||||||
response = self.c.post('/rowers/garmin/deregistration/',json.dumps(data),
|
response = self.c.post('/rowers/garmin/deregistration/',json.dumps(data),
|
||||||
content_type='application/json')
|
content_type='application/json')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user