Just for htmx requests allow to unselect all exercises on list view
This commit is contained in:
4
app.py
4
app.py
@@ -62,7 +62,9 @@ def get_person(person_id):
|
|||||||
'max_date'), '%Y-%m-%d') or max_date
|
'max_date'), '%Y-%m-%d') or max_date
|
||||||
|
|
||||||
selected_exercise_ids = [int(i)
|
selected_exercise_ids = [int(i)
|
||||||
for i in request.args.getlist('exercise_id')] or [e['ExerciseId'] for e in person['Exercises']]
|
for i in request.args.getlist('exercise_id')]
|
||||||
|
if not selected_exercise_ids and not htmx:
|
||||||
|
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
|
person['Workouts'] = [filter_workout_topsets(workout, selected_exercise_ids) for workout in person['Workouts'] if
|
||||||
workout['StartDate'] <= max_date and workout['StartDate'] >= min_date]
|
workout['StartDate'] <= max_date and workout['StartDate'] >= min_date]
|
||||||
|
|||||||
Reference in New Issue
Block a user