feat: return org summary when creating group
This commit is contained in:
parent
5d122a7690
commit
c74e895bf1
2 changed files with 4 additions and 2 deletions
|
|
@ -282,9 +282,10 @@ async def create_group(
|
|||
or "UNIQUE constraint failed" in str(e.orig) # SQLite unique violation
|
||||
):
|
||||
raise ConflictException("Group with this name already exists")
|
||||
response = GroupSchema(**group_model.__dict__)
|
||||
group_response = GroupSchema(**group_model.__dict__)
|
||||
org_response = OrgSummary(**org_model.__dict__)
|
||||
db.commit()
|
||||
return {"group": response}
|
||||
return {"group": group_response, "organisation": org_response}
|
||||
|
||||
|
||||
@router.put(
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ class IAMPostGroupRequest(OrgIDMixin):
|
|||
|
||||
|
||||
class IAMPostGroupResponse(CustomBaseModel):
|
||||
organisation: OrgSummary
|
||||
group: GroupSchema
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue