From c6ea230a56bd88a58bbdfb2b01635da348ac2b80 Mon Sep 17 00:00:00 2001 From: Livio Amstutz Date: Tue, 30 Mar 2021 15:00:57 +0200 Subject: [PATCH] fix: unique constrains of org domain (#1500) * fix: unique constrains of project grant * fix: unique constrains of org domain --- internal/command/unique_constraints_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/command/unique_constraints_model.go b/internal/command/unique_constraints_model.go index 64b83100c2..196963611b 100644 --- a/internal/command/unique_constraints_model.go +++ b/internal/command/unique_constraints_model.go @@ -46,7 +46,7 @@ func (rm *UniqueConstraintReadModel) Reduce() error { case *org.OrgChangedEvent: rm.changeUniqueConstraint(e.Aggregate().ID, e.Aggregate().ID, org.NewAddOrgNameUniqueConstraint(e.Name)) case *org.DomainVerifiedEvent: - rm.addUniqueConstraint(e.Aggregate().ID, e.Aggregate().ID, org.NewAddOrgNameUniqueConstraint(e.Domain)) + rm.addUniqueConstraint(e.Aggregate().ID, e.Aggregate().ID, org.NewAddOrgDomainUniqueConstraint(e.Domain)) case *org.DomainRemovedEvent: rm.removeUniqueConstraint(e.Aggregate().ID, e.Aggregate().ID, org.UniqueOrgDomain) case *iam.IDPConfigAddedEvent: