fix:design progress
This commit is contained in:
@@ -67,11 +67,12 @@ class DesignProgressRepository(BaseRepository[CreateDesignProgress]):
|
|||||||
async def check_complete(self,get_record:GetRecord):
|
async def check_complete(self,get_record:GetRecord):
|
||||||
result = False
|
result = False
|
||||||
if get_record.type and get_record.type < 7:
|
if get_record.type and get_record.type < 7:
|
||||||
progress = await use_collection(COLLECTION).find_one(
|
progress = await use_collection(COLLECTION).find(
|
||||||
{"project_id": get_record.project_id, "type": int(get_record.type)+1})
|
{"project_id": get_record.project_id, "type": int(get_record.type)+1}).to_list(None)
|
||||||
if progress:
|
if progress:
|
||||||
|
ids = [i["_id"] for i in progress]
|
||||||
records = await use_collection('design_progress_record').find_one(
|
records = await use_collection('design_progress_record').find_one(
|
||||||
{"design_progress_id": progress["_id"]})
|
{"design_progress_id": {"$in":ids}})
|
||||||
if records:
|
if records:
|
||||||
result=True
|
result=True
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user