From b6278af5c7ed7fb845a71ad0e64f8b87402a8f4b Mon Sep 17 00:00:00 2001 From: Arne Luenser Date: Fri, 8 Nov 2024 14:22:56 +0100 Subject: [PATCH] fix: order-by clause and span names (#4200) --- persistence/sql/identity/persister_identity.go | 2 +- selfservice/hook/show_verification_ui.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/persistence/sql/identity/persister_identity.go b/persistence/sql/identity/persister_identity.go index a2fb51a0d5ab..489b1fbb4360 100644 --- a/persistence/sql/identity/persister_identity.go +++ b/persistence/sql/identity/persister_identity.go @@ -755,7 +755,7 @@ func QueryForCredentials(con *pop.Connection, where ...Where) (credentialsPerIde ).LeftJoin(identifiersTableNameWithIndexHint(con), "identity_credential_identifiers.identity_credential_id = identity_credentials.id AND identity_credential_identifiers.nid = identity_credentials.nid", ).Order( - "identity_credentials.id ASC", + "identity_credential_identifiers.identifier ASC", ) for _, w := range where { q = q.Where("("+w.Condition+")", w.Args...) diff --git a/selfservice/hook/show_verification_ui.go b/selfservice/hook/show_verification_ui.go index 65a5935ec7a6..580292a26ccd 100644 --- a/selfservice/hook/show_verification_ui.go +++ b/selfservice/hook/show_verification_ui.go @@ -53,7 +53,7 @@ func (e *ShowVerificationUIHook) ExecutePostRegistrationPostPersistHook(_ http.R // ExecuteLoginPostHook adds redirect headers and status code if the request is a browser request. // If the request is not a browser request, this hook does nothing. func (e *ShowVerificationUIHook) ExecuteLoginPostHook(_ http.ResponseWriter, r *http.Request, _ node.UiNodeGroup, f *login.Flow, _ *session.Session) error { - return otelx.WithSpan(r.Context(), "selfservice.hook.ShowVerificationUIHook.ExecutePostRegistrationPostPersistHook", func(ctx context.Context) error { + return otelx.WithSpan(r.Context(), "selfservice.hook.ShowVerificationUIHook.ExecuteLoginPostHook", func(ctx context.Context) error { return e.execute(r.WithContext(ctx), f) }) }