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):
60
60
cosmos_helper : CosmosDBFacade = None
61
61
62
62
63
- class CosmosDBModel () :
63
+ class CosmosDBModel :
64
64
def __init__ (self , data ):
65
65
names = set ([f .name for f in dataclasses .fields (self )])
66
66
for k , v in data .items ():
@@ -124,7 +124,7 @@ def create_custom_sql_conditions(custom_sql_conditions: List[str]) -> str:
124
124
return ''
125
125
126
126
@staticmethod
127
- def generate_params (conditions : dict ) -> dict :
127
+ def generate_params (conditions : dict ) -> list :
128
128
result = []
129
129
for k , v in conditions .items ():
130
130
result .append ({
@@ -255,7 +255,8 @@ class CosmosDBDao(CRUDDao):
255
255
def __init__ (self , repository : CosmosDBRepository ):
256
256
self .repository = repository
257
257
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 {}
259
260
event_ctx = self .create_event_context ("read-many" )
260
261
return self .repository .find_all (event_ctx , conditions = conditions , ** kwargs )
261
262
Original file line number Diff line number Diff line change 16
16
17
17
class CRUDDao (abc .ABC ):
18
18
@abc .abstractmethod
19
- def get_all (self , conditions : dict , ** kwargs ):
19
+ def get_all (self , conditions : dict = None , ** kwargs ):
20
20
raise NotImplementedError # pragma: no cover
21
21
22
22
@abc .abstractmethod
You can’t perform that action at this time.
0 commit comments