API - add elevation to workout w/o gpx file when provided

This commit is contained in:
Sam
2022-12-14 14:40:29 +01:00
parent fbda86e123
commit 8a0e1d2b40
5 changed files with 186 additions and 5 deletions

View File

@ -160,6 +160,8 @@ def create_workout(
else float(new_workout.distance) / (duration.seconds / 3600)
)
new_workout.max_speed = new_workout.ave_speed
new_workout.ascent = workout_data.get('ascent')
new_workout.descent = workout_data.get('descent')
return new_workout