diff --git a/fittrackee/database_utils.py b/fittrackee/database_utils.py index 7570a26b..d84c3d77 100644 --- a/fittrackee/database_utils.py +++ b/fittrackee/database_utils.py @@ -44,7 +44,7 @@ def init_database(app: Flask) -> None: sport = Sport(label='Trail') sport.img = '/img/sports/trail.png' sport.is_default = True - db.session.add(sport) + db.session.add(sport) sport = Sport(label='Walking') sport.img = '/img/sports/walking.png' sport.is_default = True @@ -56,7 +56,7 @@ def init_database(app: Flask) -> None: sport = Sport(label='Skiing (Cross Country)') sport.img = '/img/sports/cross-country-skiing.png' sport.is_default = True - db.session.add(sport) + db.session.add(sport) sport = Sport(label='Rowing') sport.img = '/img/sports/rowing.png' sport.is_default = True diff --git a/fittrackee/workouts/stats.py b/fittrackee/workouts/stats.py index de9a97a5..5ca9a23e 100644 --- a/fittrackee/workouts/stats.py +++ b/fittrackee/workouts/stats.py @@ -129,7 +129,7 @@ def get_workouts( ] += float(workout.distance) workouts_list_by_time[time_period][sport_id][ 'total_duration' - ] += convert_timedelta_to_integer(workout.moving) + ] += convert_timedelta_to_integer(workout.moving) if workout.ascent: workouts_list_by_time[time_period][sport_id][ 'total_ascent'