fix: load tenants and roles when creating user

This commit is contained in:
Igor Ilic 2025-10-19 21:57:39 +02:00
parent 13f0423a55
commit d6bb95e379

View file

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