From d1f8adc797c3c6edd63b34d2da734783d9720138 Mon Sep 17 00:00:00 2001 From: FivePixels Date: Mon, 9 May 2022 16:43:19 -0500 Subject: Update records query to return all(), update footer on recent workouts to include number of recent workouts, programmatically add graphs to home page --- app/routes/basic.py | 1 + 1 file changed, 1 insertion(+) (limited to 'app/routes/basic.py') diff --git a/app/routes/basic.py b/app/routes/basic.py index b211da7..bd5beb3 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 -- cgit v1.2.3 From 99f2a95682b2acc03c595211a33cb1715abac429 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Mon, 9 May 2022 17:59:40 -0500 Subject: Fix blank graph bug --- app/routes/basic.py | 1 + 1 file changed, 1 insertion(+) (limited to 'app/routes/basic.py') diff --git a/app/routes/basic.py b/app/routes/basic.py index bd5beb3..584d837 100644 --- a/app/routes/basic.py +++ b/app/routes/basic.py @@ -37,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() ) -- cgit v1.2.3