diff --git a/app/handlers/signup.go b/app/handlers/signup.go index acb744f84..e6dcdcdb1 100644 --- a/app/handlers/signup.go +++ b/app/handlers/signup.go @@ -123,7 +123,7 @@ func CreateTenant() web.HandlerFunc { // Handle userlist. if env.Config.UserList.Enabled { - c.Enqueue(tasks.UserListCreateCompany(*c.Tenant(), *user)) + c.Enqueue(tasks.UserListCreateCompany(*createTenant.Result, *user)) } return c.Ok(web.Map{}) diff --git a/app/handlers/signup_test.go b/app/handlers/signup_test.go index 191593ecd..e0a07540e 100644 --- a/app/handlers/signup_test.go +++ b/app/handlers/signup_test.go @@ -196,6 +196,12 @@ func TestCreateTenantHandler_SingleHost_WithSocialAccount(t *testing.T) { var newTenant *cmd.CreateTenant bus.AddHandler(func(ctx context.Context, c *cmd.CreateTenant) error { newTenant = c + newTenant.Result = &entity.Tenant{ + ID: 1, + Name: c.Name, + Subdomain: c.Subdomain, + Status: enum.TenantActive, + } return nil })