fix: patch org root

Expanding the org model does not expand calculated properties
This commit is contained in:
Chris Milne 2026-06-01 13:07:42 +01:00
parent b8b6e6c7ee
commit d85b0d6cd6

View file

@ -234,7 +234,7 @@ async def update_root_user(db: db_dependency, org_model: org_model_body_dependen
raise UnauthorizedException(message="This user does not belong to your organisation.")
org_model.root_user_rel = user_model
db.flush()
response = OrgPatchRootResponse(**org_model.__dict__)
response = OrgPatchRootResponse(name=org_model.name, root_user_email=org_model.root_user_email)
db.commit()
return response