fix(project):add list project

This commit is contained in:
shahzeydyfah
2024-03-09 23:09:29 +03:30
parent 9627420f38
commit 061bdec516
-3
View File
@@ -58,9 +58,6 @@ class DesignProgressRepository(BaseRepository[CreateDesignProgress]):
return await self.get(get_record)
async def get(self,get_record:GetRecord):
print("2222222")
if get_record.type in [2,3] and not get_record.sub_type:
raise HTTPException(status_code=422,detail='لطفا نوع زیرمجموعه را ارد کنید')
progress = await use_collection(COLLECTION).find_one({"project_id":get_record.project_id,"type":get_record.type,"sub_type":get_record.sub_type})
if progress:
progress['records'] = await use_collection('design_progress_record').find({"design_progress_id":progress["_id"]}).to_list(None)