Implementing the partner into the db and contracts

This commit is contained in:
2025-05-02 00:03:08 +02:00
parent 6683d60be5
commit f9b6aae927
5 changed files with 35 additions and 16 deletions

View File

@@ -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