fix(project):add list project
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user