fix(contract):change required field to optional in detail

This commit is contained in:
shahzeydyfah
2025-01-20 23:38:02 +03:30
parent 89991b283a
commit 501fafc5d8
+1 -1
View File
@@ -11,7 +11,7 @@ class RegisterStatusRepository(BaseRepository):
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)
if last:
if last and len(last) > 0 and 'number' in last[0]:
return last[0]['number']
else:
return None