@@ -212,21 +212,16 @@ def get_folder_name(name: str = None):
212212 return name
213213 return "root"
214214
215- def search_project (self , name : str , ** kwargs ) -> Response :
216- conditions = []
215+ def search_project (
216+ self , name : str = None , include_complete_image_count = False
217+ ) -> Response :
218+ condition = Condition .get_empty_condition ()
217219 if name :
218- conditions .append (Condition ("name" , name , EQ ))
219- for key , val in kwargs .items ():
220- conditions .append (Condition (key , val , EQ ))
221- condition_set = None
222- if conditions :
223- for condition in conditions :
224- if condition_set :
225- condition_set &= condition
226- else :
227- condition_set = condition
220+ condition = condition & (Condition ("name" , name , EQ ))
221+ if include_complete_image_count :
222+ condition = condition & Condition ("completeImagesCount" , "true" , EQ )
228223 use_case = usecases .GetProjectsUseCase (
229- condition = condition_set , projects = self .projects , team_id = self .team_id ,
224+ condition = condition , projects = self .projects , team_id = self .team_id ,
230225 )
231226 return use_case .execute ()
232227
0 commit comments