diff --git a/app.py b/app.py index b7ffcfe..3023dbf 100644 --- a/app.py +++ b/app.py @@ -214,7 +214,7 @@ def get_workout_start_date(person_id, workout_id): @ validate_topset def get_topset(person_id, workout_id, topset_id): topset = db.get_topset(person_id, workout_id, topset_id) - return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=topset_id, exercise_name=topset['ExerciseName'], repetitions=topset['Repetitions'], weight=topset['Weight']) + return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=topset_id, exercise_id=topset['ExerciseId'], exercise_name=topset['ExerciseName'], repetitions=topset['Repetitions'], weight=topset['Weight']) @ app.route("/person//workout//topset//edit_form", methods=['GET']) @@ -236,7 +236,7 @@ def create_topset(person_id, workout_id): workout_id, exercise_id, repetitions, weight) exercise = db.get_exercise(exercise_id) - return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=new_topset_id, exercise_name=exercise['Name'], repetitions=repetitions, weight=weight), 200, {"HX-Trigger": "topsetAdded"} + return render_template('partials/topset.html', person_id=person_id, workout_id=workout_id, topset_id=new_topset_id, exercise_id=exercise_id, exercise_name=exercise['Name'], repetitions=repetitions, weight=weight), 200, {"HX-Trigger": "topsetAdded"} @ app.route("/person//workout//topset/", methods=['PUT']) diff --git a/templates/partials/topset.html b/templates/partials/topset.html index 20f7c8e..2870648 100644 --- a/templates/partials/topset.html +++ b/templates/partials/topset.html @@ -1,7 +1,9 @@ {% if is_edit|default(false, true) == false %} - {{ exercise_name }} + {{ exercise_name }} {% else %}