fix: unique constrains of org domain (#1500)

* fix: unique constrains of project grant

* fix: unique constrains of org domain
This commit is contained in:
Livio Amstutz 2021-03-30 15:00:57 +02:00 committed by GitHub
parent 868749e9c0
commit c6ea230a56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: