fix: load tenants and roles when creating user
This commit is contained in:
parent
13f0423a55
commit
d6bb95e379
1 changed files with 4 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ async def create_user(
|
|||
if auto_login:
|
||||
await session.refresh(user)
|
||||
|
||||
# Update tenants and roles information for User object
|
||||
_ = await user.awaitable_attrs.tenants
|
||||
_ = await user.awaitable_attrs.roles
|
||||
|
||||
return user
|
||||
except UserAlreadyExists as error:
|
||||
print(f"User {email} already exists")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue