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

4
app.py
View File

@@ -399,8 +399,8 @@ def get_most_recent_topset_for_exercise(person_id, workout_id):
if not topset:
return render_template('partials/new_set_form.html', person_id=person_id, workout_id=workout_id, exercises=exercises, exercise_id=exercise_id, has_value=False)
(repetitions, weight) = topset
return render_template('partials/new_set_form.html', person_id=person_id, workout_id=workout_id, exercises=exercises, has_value=True, exercise_id=exercise_id, repetitions=repetitions, weight=weight)
(repetitions, weight, exercise_name) = topset
return render_template('partials/new_set_form.html', person_id=person_id, workout_id=workout_id, has_value=True, exercise_id=exercise_id, exercise_name=exercise_name, repetitions=repetitions, weight=weight)
def calculate_relative_positions(start_dates):