From f093b46d5ba76faa66a43c95c22f9240f8870902 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Sat, 30 Apr 2022 13:41:38 -0500 Subject: Fix navbar burger and some other stuff --- app/routes/basic.py | 4 ++-- app/routes/workout.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'app/routes') diff --git a/app/routes/basic.py b/app/routes/basic.py index f6cb005..684daf2 100644 --- a/app/routes/basic.py +++ b/app/routes/basic.py @@ -15,8 +15,8 @@ def home(): # Prepare so we don't have to do this in the template records = ( db.session.query(WorkoutRecord) - .join(Workout) - .filter(Workout.user_id == current_user.id) + .filter_by(user_id=current_user.id) + .order_by(WorkoutRecord.finished.desc()) ) return render_template("home.html", records=records) diff --git a/app/routes/workout.py b/app/routes/workout.py index 9b46694..1d46aed 100644 --- a/app/routes/workout.py +++ b/app/routes/workout.py @@ -120,6 +120,7 @@ def workout_record(): for se in ee.sets.entries: lbs = se.data["lbs"] units = se.data["units"] + print(id, lbs, units) if lbs and units: # Add the set to the workout record -- cgit v1.2.3