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