Browse Source

Change sorting statement back...

ogert 5 years ago
parent
commit
125f105bb4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cdplib/db_handlers/MongodbHandler.py

+ 1 - 1
cdplib/db_handlers/MongodbHandler.py

@@ -446,7 +446,7 @@ class MongodbHandler:
             if attribute == None or attribute_value == None:
                 data = self._database[collection_name].find({},{'_id': return_id}).sort(sort_label, direction).limit(limit)
             else:
-                data = self._database[collection_name].find({attribute: {comparison_operator: attribute_value}}, {'_id': return_id}).sort({sort_label: direction}).limit(limit)
+                data = self._database[collection_name].find({attribute: {comparison_operator: attribute_value}}, {'_id': return_id}).sort(sort_label, direction).limit(limit)
 
             if len(list(data)) == 0:
                 self._log.warning('No data was found for the query')