Revert change made in previous commit where if no exerises where selected manually then all would be

This commit is contained in:
Peter Stockings
2023-03-20 21:44:18 +11:00
parent f3c96ca11f
commit 37aaa9b3f3
2 changed files with 3 additions and 4 deletions

3
app.py
View File

@@ -62,8 +62,7 @@ def get_person(person_id):
'max_date'), '%Y-%m-%d') or max_date
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')] or [e['ExerciseId'] for e in person['Exercises']]
person['Workouts'] = [filter_workout_topsets(workout, selected_exercise_ids) for workout in person['Workouts'] if
workout['StartDate'] <= max_date and workout['StartDate'] >= min_date]