Skip to content
Snippets Groups Projects
Commit 0016e30d authored by ddamiron's avatar ddamiron
Browse files

hotfix get latest log using /status/latest/<session_id>

parent c9bebb12
Branches
No related tags found
No related merge requests found
......@@ -70,7 +70,8 @@ class MongoSession:
def get_most_recent_log(self, this_session_id):
try:
data = []
request_result = self.mongo_data_collection.find({"session_id": this_session_id}).sort({"_id": -1}).limit(1)
request_result = self.mongo_data_collection.find({"session_id": this_session_id}).sort([('timestamp', -1)]).limit(1)
for res in request_result:
data.append(res)
return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment