File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
commons/data_access_layer Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ def delete_container(self, container_id: str):
6060cosmos_helper : CosmosDBFacade = None
6161
6262
63- class CosmosDBModel () :
63+ class CosmosDBModel :
6464 def __init__ (self , data ):
6565 names = set ([f .name for f in dataclasses .fields (self )])
6666 for k , v in data .items ():
@@ -124,7 +124,7 @@ def create_custom_sql_conditions(custom_sql_conditions: List[str]) -> str:
124124 return ''
125125
126126 @staticmethod
127- def generate_params (conditions : dict ) -> dict :
127+ def generate_params (conditions : dict ) -> list :
128128 result = []
129129 for k , v in conditions .items ():
130130 result .append ({
@@ -255,7 +255,8 @@ class CosmosDBDao(CRUDDao):
255255 def __init__ (self , repository : CosmosDBRepository ):
256256 self .repository = repository
257257
258- def get_all (self , conditions : dict = {}, ** kwargs ) -> list :
258+ def get_all (self , conditions : dict = None , ** kwargs ) -> list :
259+ conditions = conditions if conditions else {}
259260 event_ctx = self .create_event_context ("read-many" )
260261 return self .repository .find_all (event_ctx , conditions = conditions , ** kwargs )
261262
Original file line number Diff line number Diff line change 1616
1717class CRUDDao (abc .ABC ):
1818 @abc .abstractmethod
19- def get_all (self , conditions : dict , ** kwargs ):
19+ def get_all (self , conditions : dict = None , ** kwargs ):
2020 raise NotImplementedError # pragma: no cover
2121
2222 @abc .abstractmethod
You can’t perform that action at this time.
0 commit comments