소스 검색

Refactor update method and add variable for advanced update queries

ogert 4 년 전
부모
커밋
413ee449f8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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",