Fix regression where selecting an exercise didnt populate reps/weight inputs with last set and resize progress graph on desktop

This commit is contained in:
Peter Stockings
2024-11-05 15:04:06 +11:00
parent 4fe9271555
commit 616b57e1db
5 changed files with 27 additions and 14 deletions

6
db.py
View File

@@ -448,9 +448,11 @@ class DataBase():
topset = self.execute("""
SELECT
t.repetitions,
t.weight
t.weight,
e.name as "exercise_name"
FROM
topset t JOIN workout w ON t.workout_id = w.workout_id
JOIN exercise e ON t.exercise_id = e.exercise_id
WHERE
w.person_id = %s AND t.exercise_id = %s
ORDER BY
@@ -461,7 +463,7 @@ class DataBase():
if not topset:
return None
else:
return (topset['repetitions'], topset['weight'])
return (topset['repetitions'], topset['weight'], topset['exercise_name'])
def get_all_exercises(self):
exercises = self.execute(