diff --git a/rowers/garmin_stuff.py b/rowers/garmin_stuff.py index 9e9502a1..3ce43ebf 100644 --- a/rowers/garmin_stuff.py +++ b/rowers/garmin_stuff.py @@ -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'] diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py index eb2af21c..83c68a7a 100644 --- a/rowers/plannedsessions.py +++ b/rowers/plannedsessions.py @@ -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 diff --git a/rowers/tests/test_imports.py b/rowers/tests/test_imports.py index 3abb8944..ef9e3935 100644 --- a/rowers/tests/test_imports.py +++ b/rowers/tests/test_imports.py @@ -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')