summaryrefslogtreecommitdiff
path: root/app/routes/basic.py
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-05-11 15:19:43 -0500
committerstilbruch <stilbruch@protonmail.com>2022-05-11 15:19:43 -0500
commitd73b73e8ec1fbfadadc7500f99e5a89bda545652 (patch)
treef6b040aa850ae8dc837e254b881e84c0e62b66fa /app/routes/basic.py
parent141b8cf1e4a867e4b52506b950b46cac2ea27984 (diff)
parent98c1eb525e0768aa69ac598565dd0d8d2975e65a (diff)
downloadStrengthy-d73b73e8ec1fbfadadc7500f99e5a89bda545652.tar.xz
Strengthy-d73b73e8ec1fbfadadc7500f99e5a89bda545652.zip
Merge branch 'master' of stilbruch.xyz:strengthy
Diffstat (limited to 'app/routes/basic.py')
-rw-r--r--app/routes/basic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/routes/basic.py b/app/routes/basic.py
index b211da7..584d837 100644
--- a/app/routes/basic.py
+++ b/app/routes/basic.py
@@ -17,6 +17,7 @@ def home():
db.session.query(WorkoutRecord)
.filter_by(user_id=current_user.id)
.order_by(WorkoutRecord.finished.desc())
+ .all()
)
# Set records length
@@ -36,6 +37,7 @@ def home():
.filter(SetRecord.exercise_id == Exercise.id)
.group_by(Exercise.id)
.order_by(db.func.count(SetRecord.id).desc())
+ .having(db.func.count(SetRecord.id) > 1)
.limit(3)
.all()
)