Improve forecast readability and rep targets
This commit is contained in:
@@ -244,8 +244,9 @@ def get_exercise_progress_for_user(person_id, exercise_id):
|
||||
forecast_enabled = request.args.get('forecast', '').lower() in ('1', 'true', 'yes', 'on')
|
||||
forecast_weeks = request.args.get('forecast_weeks', type=int, default=8)
|
||||
forecast_weeks = max(4, min(forecast_weeks, 26))
|
||||
forecast_target_reps = request.args.get('forecast_reps', type=int, default=5)
|
||||
forecast_target_reps = max(1, min(forecast_target_reps, 12))
|
||||
forecast_target_reps = request.args.get('forecast_reps', type=int)
|
||||
if forecast_target_reps is not None:
|
||||
forecast_target_reps = max(1, min(forecast_target_reps, 20))
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user