mirror of
https://github.com/bec-project/bec_atlas.git
synced 2025-07-14 07:01:48 +02:00
fix(sorting): fixed sorting for scans and sessions
This commit is contained in:
@ -84,6 +84,9 @@ class ScanRouter(BaseRouter):
|
|||||||
filter = json.loads(filter)
|
filter = json.loads(filter)
|
||||||
filters.update(filter)
|
filters.update(filter)
|
||||||
|
|
||||||
|
if sort:
|
||||||
|
sort = json.loads(sort)
|
||||||
|
|
||||||
return self.db.find(
|
return self.db.find(
|
||||||
"scans",
|
"scans",
|
||||||
filters,
|
filters,
|
||||||
|
@ -67,6 +67,10 @@ class SessionRouter(BaseRouter):
|
|||||||
for field in fields
|
for field in fields
|
||||||
if field in Session.model_json_schema()["properties"].keys()
|
if field in Session.model_json_schema()["properties"].keys()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if sort:
|
||||||
|
sort = json.loads(sort)
|
||||||
|
|
||||||
return self.db.find(
|
return self.db.find(
|
||||||
"sessions",
|
"sessions",
|
||||||
filter,
|
filter,
|
||||||
|
Reference in New Issue
Block a user