From 8b5217c06dc346301d6a7373a74998d2addc6846 Mon Sep 17 00:00:00 2001 From: Silvan Date: Wed, 5 Apr 2023 14:06:26 +0200 Subject: [PATCH] fix(query): only active by org by primary domain (#5610) --- internal/query/org.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/query/org.go b/internal/query/org.go index 08931a8f8f..b3dc88b9dc 100644 --- a/internal/query/org.go +++ b/internal/query/org.go @@ -118,6 +118,7 @@ func (q *Queries) OrgByPrimaryDomain(ctx context.Context, domain string) (_ *Org query, args, err := stmt.Where(sq.Eq{ OrgColumnDomain.identifier(): domain, OrgColumnInstanceID.identifier(): authz.GetInstance(ctx).InstanceID(), + OrgColumnState.identifier(): domain_pkg.OrgStateActive, }).ToSql() if err != nil { return nil, errors.ThrowInternal(err, "QUERY-TYUCE", "Errors.Query.SQLStatement")