瀏覽代碼

Add variable for filtering return values in 'query_data_and_generate_dataframe'

ogert 5 年之前
父節點
當前提交
c62797217b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      cdplib/db_handlers/MongodbHandler.py

+ 2 - 2
cdplib/db_handlers/MongodbHandler.py

@@ -268,9 +268,9 @@ class MongodbHandler:
 
         try:
             if attribute == None or attribute_value == None:
-                data = self._database[collection_name].find({},return_value)
+                data = self._database[collection_name].find({},return_values)
             else:
-                data = self._database[collection_name].find({attribute: {comparison_operator: attribute_value}}, return_value)
+                data = self._database[collection_name].find({attribute: {comparison_operator: attribute_value}}, return_values)
 
         except Exception as error:
             self._log.log_and_raise_error(('An error occured trying to query data from {}, with query {}: {}:{}. \nError:{}').format(collection_name, attribute, comparison_operator, attribute_value, error))