Skip to content

Commit

Permalink
Merge pull request #326 from flask-dashboard/custom-graphs-enddate
Browse files Browse the repository at this point in the history
Include the selected date into the custom graph end date
  • Loading branch information
mircealungu committed Apr 29, 2020
2 parents ac344a7 + a24913d commit d9f9891
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flask_monitoringdashboard/database/custom_graph.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from datetime import timedelta

from sqlalchemy.orm.exc import NoResultFound

from flask_monitoringdashboard.database import CustomGraph, CustomGraphData, row2dict
Expand Down Expand Up @@ -43,7 +45,7 @@ def get_graph_data(db_session, graph_id, start_date, end_date):
.filter(
CustomGraphData.graph_id == graph_id,
CustomGraphData.time >= start_date,
CustomGraphData.time <= end_date,
CustomGraphData.time < end_date + timedelta(days=1),
)
.all()
]

0 comments on commit d9f9891

Please sign in to comment.