fix(project):add list project

This commit is contained in:
shahzeydyfah
2024-03-09 23:08:22 +03:30
parent 875b65494d
commit 9627420f38
+1 -1
View File
@@ -59,7 +59,7 @@ class DesignProgressRepository(BaseRepository[CreateDesignProgress]):
async def get(self,get_record:GetRecord):
print("2222222")
if get_record.type in [2,3]:
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: