From ef85e04c3d3905dc350d330651cd88c024bfd926 Mon Sep 17 00:00:00 2001 From: Tlams Date: Mon, 19 Feb 2018 16:09:44 +0000 Subject: [PATCH] Change find_one to find, for iso output --- code/scripts/main/core/modules/mod_database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/scripts/main/core/modules/mod_database.py b/code/scripts/main/core/modules/mod_database.py index d66b2ba..063e175 100644 --- a/code/scripts/main/core/modules/mod_database.py +++ b/code/scripts/main/core/modules/mod_database.py @@ -110,7 +110,7 @@ class MongoDB: result = { "result": "OK", "value": json.loads( - dumps(self.db[self.collection_clusters].find_one( + dumps(self.db[self.collection_clusters].find( {'$and': [{'date': int(date), 'cluster': cluster}]}))) } @@ -272,7 +272,7 @@ class MongoDB: result = { "result": "OK", "value": json.loads( - dumps(self.db[self.collection_nodes].find_one( + dumps(self.db[self.collection_nodes].find( {'$and': [{'date': int(date), 'cluster': cluster, 'node': node}]}))) } @@ -325,7 +325,7 @@ class MongoDB: result = { "result": "OK", "value": json.loads(dumps( - self.db[self.collection_instances].find_one( + self.db[self.collection_instances].find( {'$and': [{"date": int(date), "cluster": cluster, "node": node, "vmid": int(vmid)}]}))) }