Bladeren bron

Refactor update method and add variable for advanced update queries

ogert 4 jaren geleden
bovenliggende
commit
413ee449f8
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      cdplib/db_handlers/MongodbHandler.py

+ 1 - 1
cdplib/db_handlers/MongodbHandler.py

@@ -469,7 +469,7 @@ class MongodbHandler:
             self._log.warning('No data was found for the query')
             return None
 
-    def update_data_in_collection(self, update_label:str, update_value: str, collection_name:str, query_label: str = None, query_value: str = None, create_if_not_exist: bool = True, find_query: dict = None, update_query:dict = None, update_many: bool = False):
+    def update_data_in_collection(self, collection_name:str, update_label:str = None, update_value: str = None,  query_label: str = None, query_value: str = None, create_if_not_exist: bool = True, find_query: dict = None, update_query:dict = None, update_many: bool = False):
 
         if isinstance(update_value, pd.DataFrame):
             update_value = simplejson.loads(update_value.to_json(orient="records",