Revert change made in previous commit where if no exerises where selected manually then all would be
This commit is contained in:
3
app.py
3
app.py
@@ -62,8 +62,7 @@ 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')]
|
for i in request.args.getlist('exercise_id')] or [e['ExerciseId'] for e in person['Exercises']]
|
||||||
# or [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]
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-city">
|
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-city">
|
||||||
Exercises
|
Exercises
|
||||||
</label>
|
</label>
|
||||||
<select id="multiSelection" data-te-select-init name="exercise_id"
|
<select id="multiSelection" data-te-select-init data-te-select-filter="true" name="exercise_id"
|
||||||
class="bg-gray-50 border border-gray-300 " multiple hx-trigger="change"
|
class="bg-gray-50 border border-gray-300 " multiple
|
||||||
hx-get="{{ url_for('get_person', person_id=person['PersonId']) }}"
|
hx-get="{{ url_for('get_person', person_id=person['PersonId']) }}"
|
||||||
hx-include="[name='min_date'],[name='max_date']" hx-target="#container" hx-push-url="true">
|
hx-include="[name='min_date'],[name='max_date']" hx-target="#container" hx-push-url="true">
|
||||||
{% for e in person['Exercises'] %}
|
{% for e in person['Exercises'] %}
|
||||||
|
|||||||
Reference in New Issue
Block a user