From 2499185b2d1adae0d45f9f9f3cdd1208c56357f4 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Mon, 20 Mar 2023 22:16:44 +1100 Subject: [PATCH] Only allow clearing of selected exercises if user is deselecting from exercise picker --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index feb95ac..417f2ed 100644 --- a/app.py +++ b/app.py @@ -63,7 +63,7 @@ def get_person(person_id): selected_exercise_ids = [int(i) for i in request.args.getlist('exercise_id')] - if not selected_exercise_ids and not htmx: + if not selected_exercise_ids and htmx.trigger_name != 'exercise_id': selected_exercise_ids = [e['ExerciseId'] for e in person['Exercises']] person['Workouts'] = [filter_workout_topsets(workout, selected_exercise_ids) for workout in person['Workouts'] if