From 2b1b465c5501573138807673d2f735709ea2c414 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 6 Nov 2021 22:31:31 +0100 Subject: [PATCH] API - fix workouts sort on moving duration --- fittrackee/workouts/workouts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fittrackee/workouts/workouts.py b/fittrackee/workouts/workouts.py index 27279c3b..78191250 100644 --- a/fittrackee/workouts/workouts.py +++ b/fittrackee/workouts/workouts.py @@ -256,10 +256,10 @@ def get_workouts(auth_user_id: int) -> Union[Dict, HttpResponse]: Workout.distance.desc() if order_by == 'distance' and order == 'desc' else True, - Workout.duration.asc() + Workout.moving.asc() if order_by == 'duration' and order == 'asc' else True, - Workout.duration.desc() + Workout.moving.desc() if order_by == 'duration' and order == 'desc' else True, Workout.workout_date.asc()