diff --git a/app.py b/app.py
index 18b05a3..66757fd 100644
--- a/app.py
+++ b/app.py
@@ -1,4 +1,3 @@
-from sqlalchemy import desc
from flask_basicauth import BasicAuth
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
@@ -44,7 +43,7 @@ class User(db.Model):
bike_id = db.Column(db.Integer, db.ForeignKey(
'bikes.id', ondelete='CASCADE'), nullable=False)
workouts = db.relationship(
- 'Workout', backref='user', lazy=True, order_by='desc(Workout.created_at)') # 'Workout.created_at'
+ 'Workout', backref='user', lazy=True, order_by='desc(Workout.created_at)')
bike = db.relationship('Bike', backref='user', lazy=True)
diff --git a/templates/partials/selected_workout_view.html b/templates/partials/selected_workout_view.html
index 1edb411..cf0ff21 100644
--- a/templates/partials/selected_workout_view.html
+++ b/templates/partials/selected_workout_view.html
@@ -93,9 +93,7 @@
- {% with workout=workout, graph_types=workout['selected_graph_types'] %}
- {% include 'workout_view.html' %}
- {% endwith %}
+ {{ render_partial('workout_view.html', workout=workout, graph_types=workout['selected_graph_types']) }}