API - fix notes emptying

This commit is contained in:
Sam
2021-07-14 14:54:20 +02:00
parent 66b9c77560
commit 70ae3863e2
3 changed files with 87 additions and 55 deletions

View File

@ -202,7 +202,7 @@ def edit_workout(
workout.sport_id = workout_data.get('sport_id')
if workout_data.get('title'):
workout.title = workout_data.get('title')
if workout_data.get('notes'):
if workout_data.get('notes') is not None:
workout.notes = workout_data.get('notes')
if not workout.gpx:
if workout_data.get('workout_date'):