From 7deaca64c0f1fdce2d619735a40a897a4a3bb4e2 Mon Sep 17 00:00:00 2001 From: Matt Roberts Date: Wed, 2 Oct 2024 12:16:20 +0100 Subject: [PATCH] Fixed previous userlist change. --- app/handlers/signup.go | 2 +- app/handlers/signup_test.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 })