feat(register status):add
This commit is contained in:
@@ -12,4 +12,7 @@ class RegisterStatusRepository(BaseRepository[RegisterStatusModel]):
|
|||||||
|
|
||||||
async def get_last(self,project_id:uuid.UUID):
|
async def get_last(self,project_id:uuid.UUID):
|
||||||
last = await use_collection(TaskEnv.CLN_AUDIT_STATUS).find({"project_id":project_id}).sort('$natural', -1).to_list(1)
|
last = await use_collection(TaskEnv.CLN_AUDIT_STATUS).find({"project_id":project_id}).sort('$natural', -1).to_list(1)
|
||||||
return last
|
if last:
|
||||||
|
return last[0]['number']
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user