diff --git a/internal/query/projection/custom_text.go b/internal/query/projection/custom_text.go index a3c609de9b..64a9e0b052 100644 --- a/internal/query/projection/custom_text.go +++ b/internal/query/projection/custom_text.go @@ -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 } diff --git a/internal/query/projection/custom_text_test.go b/internal/query/projection/custom_text_test.go index 88eee0fcbc..785009d46c 100644 --- a/internal/query/projection/custom_text_test.go +++ b/internal/query/projection/custom_text_test.go @@ -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", }, }, }, diff --git a/internal/query/projection/message_text_test.go b/internal/query/projection/message_text_test.go index 0f7f3059d5..e49d75d1d5 100644 --- a/internal/query/projection/message_text_test.go +++ b/internal/query/projection/message_text_test.go @@ -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", }, }, }, diff --git a/internal/query/projection/message_texts.go b/internal/query/projection/message_texts.go index 8f78cd1ef9..53219c3c2e 100644 --- a/internal/query/projection/message_texts.go +++ b/internal/query/projection/message_texts.go @@ -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 }