diff --git a/open_workout_coach/map_yaml_to_database.py b/open_workout_coach/map_yaml_to_database.py index a9cd5be..9f4970c 100644 --- a/open_workout_coach/map_yaml_to_database.py +++ b/open_workout_coach/map_yaml_to_database.py @@ -93,7 +93,7 @@ def map_config_to_workout_file(config): ) for item in config['exercises'] ] - sessions = [create_workout_session(items)] * config['n_sessions'] + sessions = [create_workout_session(items)] * config.get('n_sessions', 1) db = create_workout_database(config['name'], sessions) return db