Add min/max filter filter for exercise sparkline graph
This commit is contained in:
3
app.py
3
app.py
@@ -418,6 +418,9 @@ def get_exercise_progress_for_user(person_id, exercise_id):
|
||||
'max_date'), '%Y-%m-%d')
|
||||
epoch = request.args.get('epoch', default='All')
|
||||
|
||||
if epoch == 'Custom' and (min_date is None or max_date is None):
|
||||
(min_date, max_date) = db.get_exercise_earliest_and_latest_dates(person_id, exercise_id)
|
||||
|
||||
exercise_progress = db.get_exercise_progress_for_user(person_id, exercise_id, min_date, max_date, epoch)
|
||||
|
||||
if not exercise_progress:
|
||||
|
||||
Reference in New Issue
Block a user