Implementing the partner into the db and contracts
This commit is contained in:
@@ -31,8 +31,7 @@ async def create(schema: ContractCreate, reg=Depends(get_authed_tenant_registry)
|
||||
contract_dict = schema.model_dump()
|
||||
del(contract_dict['draft_id'])
|
||||
|
||||
lawyer = await Entity.get(reg.db, reg.user.entity_id)
|
||||
contract_dict['lawyer'] = lawyer.model_dump()
|
||||
contract_dict['lawyer'] = reg.partner.model_dump()
|
||||
|
||||
contract_dict['name'] = draft.name
|
||||
contract_dict['title'] = draft.title
|
||||
|
||||
Reference in New Issue
Block a user