mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
fix: template removed events on projections (#2863)
This commit is contained in:
parent
cc04067da3
commit
28d7acdf99
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/logging"
|
||||
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/caos/zitadel/internal/eventstore/handler"
|
||||
@ -144,6 +145,6 @@ func (p *CustomTextProjection) reduceTemplateRemoved(event eventstore.EventReade
|
||||
[]handler.Condition{
|
||||
handler.NewCond(CustomTextAggregateIDCol, customTextEvent.Aggregate().ID),
|
||||
handler.NewCond(CustomTextTemplateCol, customTextEvent.Template),
|
||||
handler.NewCond(CustomTextLanguageCol, customTextEvent.Language),
|
||||
handler.NewCond(CustomTextLanguageCol, customTextEvent.Language.String()),
|
||||
}), nil
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ import (
|
||||
"github.com/caos/zitadel/internal/eventstore/repository"
|
||||
"github.com/caos/zitadel/internal/repository/iam"
|
||||
"github.com/caos/zitadel/internal/repository/org"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
func TestCustomTextProjection_reduces(t *testing.T) {
|
||||
@ -122,7 +121,7 @@ func TestCustomTextProjection_reduces(t *testing.T) {
|
||||
expectedArgs: []interface{}{
|
||||
"agg-id",
|
||||
"InitCode",
|
||||
language.English,
|
||||
"en",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -229,7 +228,7 @@ func TestCustomTextProjection_reduces(t *testing.T) {
|
||||
expectedArgs: []interface{}{
|
||||
"agg-id",
|
||||
"InitCode",
|
||||
language.English,
|
||||
"en",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
"github.com/caos/zitadel/internal/eventstore/repository"
|
||||
"github.com/caos/zitadel/internal/repository/iam"
|
||||
"github.com/caos/zitadel/internal/repository/org"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
func TestMessageTextProjection_reduces(t *testing.T) {
|
||||
@ -574,7 +573,7 @@ func TestMessageTextProjection_reduces(t *testing.T) {
|
||||
expectedArgs: []interface{}{
|
||||
"agg-id",
|
||||
"InitCode",
|
||||
language.English,
|
||||
"en",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/logging"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
@ -198,7 +199,7 @@ func (p *MessageTextProjection) reduceTemplateRemoved(event eventstore.EventRead
|
||||
[]handler.Condition{
|
||||
handler.NewCond(MessageTextAggregateIDCol, templateEvent.Aggregate().ID),
|
||||
handler.NewCond(MessageTextTypeCol, templateEvent.Template),
|
||||
handler.NewCond(MessageTextLanguageCol, templateEvent.Language),
|
||||
handler.NewCond(MessageTextLanguageCol, templateEvent.Language.String()),
|
||||
},
|
||||
), nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user