Skip to content
Snippets Groups Projects
Commit 7e7b7ef7 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

v2.18.0

parent e17616d8
No related branches found
No related tags found
No related merge requests found
[tool.poetry] [tool.poetry]
name = "StorageLeaf" name = "StorageLeaf"
version = "2.17.0" version = "2.18.0"
description = "Accepts sensor data and saves them into a database. The saved data can be accessed via api." description = "Accepts sensor data and saves them into a database. The saved data can be accessed via api."
authors = ["TheCodeLabsDevs"] authors = ["TheCodeLabsDevs"]
......
...@@ -118,9 +118,9 @@ def get_measurements_for_sensor(db: Session, startDateTime: str, ...@@ -118,9 +118,9 @@ def get_measurements_for_sensor(db: Session, startDateTime: str,
endDateTime: str, sensorId: int) -> List[Models.Measurement]: endDateTime: str, sensorId: int) -> List[Models.Measurement]:
if startDateTime and endDateTime: if startDateTime and endDateTime:
return db.query(Models.Measurement) \ return db.query(Models.Measurement) \
.filter(Models.Measurement.sensor_id == sensorId) \
.filter(and_(startDateTime <= Models.Measurement.timestamp, .filter(and_(startDateTime <= Models.Measurement.timestamp,
endDateTime >= Models.Measurement.timestamp, endDateTime >= Models.Measurement.timestamp)) \
Models.Measurement.sensor_id == sensorId)) \
.order_by(Models.Measurement.timestamp.desc()) \ .order_by(Models.Measurement.timestamp.desc()) \
.all() .all()
......
{ {
"version": { "version": {
"name": "v2.17.0", "name": "v2.18.0",
"code": 33, "code": 34,
"date": "17.06.24" "date": "09.09.24"
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment