API - fix workouts sort on moving duration
This commit is contained in:
parent
1013b5cdca
commit
2b1b465c55
@ -256,10 +256,10 @@ def get_workouts(auth_user_id: int) -> Union[Dict, HttpResponse]:
|
|||||||
Workout.distance.desc()
|
Workout.distance.desc()
|
||||||
if order_by == 'distance' and order == 'desc'
|
if order_by == 'distance' and order == 'desc'
|
||||||
else True,
|
else True,
|
||||||
Workout.duration.asc()
|
Workout.moving.asc()
|
||||||
if order_by == 'duration' and order == 'asc'
|
if order_by == 'duration' and order == 'asc'
|
||||||
else True,
|
else True,
|
||||||
Workout.duration.desc()
|
Workout.moving.desc()
|
||||||
if order_by == 'duration' and order == 'desc'
|
if order_by == 'duration' and order == 'desc'
|
||||||
else True,
|
else True,
|
||||||
Workout.workout_date.asc()
|
Workout.workout_date.asc()
|
||||||
|
Loading…
Reference in New Issue
Block a user