summaryrefslogtreecommitdiff
path: root/app/routes
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-05-16 18:32:24 -0500
committerstilbruch <stilbruch@protonmail.com>2022-05-16 18:32:24 -0500
commita4bce45583e5dadf42676ebfa63ad5aa7b1d639a (patch)
tree2b3b3ceacc8877057d38d0ef00ba44989ab8e9bb /app/routes
parentf7d6defc6cf8b29dec6321a192cad8eb73dbd4e7 (diff)
downloadStrengthy-a4bce45583e5dadf42676ebfa63ad5aa7b1d639a.tar.xz
Strengthy-a4bce45583e5dadf42676ebfa63ad5aa7b1d639a.zip
Fix graph date ordering
Diffstat (limited to 'app/routes')
-rw-r--r--app/routes/api.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/routes/api.py b/app/routes/api.py
index 097400d..e85648d 100644
--- a/app/routes/api.py
+++ b/app/routes/api.py
@@ -40,7 +40,9 @@ def api_progress_exercise(exercise_id=None):
SetRecord.exercise_id == exercise_id,
WorkoutRecord.user_id == current_user.id,
SetRecord.workout_record_id == WorkoutRecord.id,
- ).group_by(WorkoutRecord.id)
+ )
+ .group_by(WorkoutRecord.id)
+ .order_by(WorkoutRecord.finished)
).all()
# prepare values TODO include date