From bbd6e6358847765fa21accd3d569fe40ea339ee5 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Mon, 5 Jan 2026 18:13:58 +0100 Subject: [PATCH] Fix missing organization context Signed-off-by: Bryan Frimin --- pkg/iam/organization_service.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/iam/organization_service.go b/pkg/iam/organization_service.go index 75340411a..88dc63284 100644 --- a/pkg/iam/organization_service.go +++ b/pkg/iam/organization_service.go @@ -641,6 +641,16 @@ func (s *OrganizationService) CreateOrganization( return fmt.Errorf("cannot insert profile: %w", err) } + organizationContext := &coredata.OrganizationContext{ + OrganizationID: organizationID, + CreatedAt: now, + UpdatedAt: now, + } + + if err := organizationContext.Insert(ctx, tx, scope); err != nil { + return fmt.Errorf("cannot insert organization context: %w", err) + } + return nil }, )