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