mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: unique constraint setup step (#1496)
This commit is contained in:
parent
e8e8015aa5
commit
1771ce40b4
@ -52,7 +52,7 @@ func (rm *UniqueConstraintReadModel) Reduce() error {
|
||||
case *iam.IDPConfigAddedEvent:
|
||||
rm.addUniqueConstraint(e.Aggregate().ID, e.ConfigID, idpconfig.NewAddIDPConfigNameUniqueConstraint(e.Name, e.Aggregate().ResourceOwner))
|
||||
case *iam.IDPConfigChangedEvent:
|
||||
if e.Name != nil {
|
||||
if e.Name == nil {
|
||||
continue
|
||||
}
|
||||
rm.changeUniqueConstraint(e.Aggregate().ID, e.ConfigID, idpconfig.NewAddIDPConfigNameUniqueConstraint(*e.Name, e.Aggregate().ResourceOwner))
|
||||
@ -61,7 +61,7 @@ func (rm *UniqueConstraintReadModel) Reduce() error {
|
||||
case *org.IDPConfigAddedEvent:
|
||||
rm.addUniqueConstraint(e.Aggregate().ID, e.ConfigID, idpconfig.NewAddIDPConfigNameUniqueConstraint(e.Name, e.Aggregate().ResourceOwner))
|
||||
case *org.IDPConfigChangedEvent:
|
||||
if e.Name != nil {
|
||||
if e.Name == nil {
|
||||
continue
|
||||
}
|
||||
rm.changeUniqueConstraint(e.Aggregate().ID, e.ConfigID, idpconfig.NewAddIDPConfigNameUniqueConstraint(*e.Name, e.Aggregate().ResourceOwner))
|
||||
@ -76,7 +76,7 @@ func (rm *UniqueConstraintReadModel) Reduce() error {
|
||||
case *project.ProjectAddedEvent:
|
||||
rm.addUniqueConstraint(e.Aggregate().ID, e.Aggregate().ID, project.NewAddProjectNameUniqueConstraint(e.Name, e.Aggregate().ResourceOwner))
|
||||
case *project.ProjectChangeEvent:
|
||||
if e.Name != nil {
|
||||
if e.Name == nil {
|
||||
continue
|
||||
}
|
||||
rm.changeUniqueConstraint(e.Aggregate().ID, e.Aggregate().ID, project.NewAddProjectNameUniqueConstraint(*e.Name, e.Aggregate().ResourceOwner))
|
||||
|
Loading…
Reference in New Issue
Block a user