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