Skip to content

Commit

Permalink
Fix string comparison changes in YesSql queries (#15212)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros authored Jan 31, 2024
1 parent 3036024 commit 1dbd790
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ public async Task<string> GetContentItemIdAsync(string handle)
internal class AliasPartContentHandleHelper
{
internal static Task<ContentItem> QueryAliasIndex(ISession session, string alias) =>
session.Query<ContentItem, AliasPartIndex>(x => x.Alias.Equals(alias, StringComparison.InvariantCultureIgnoreCase)).FirstOrDefaultAsync();
session.Query<ContentItem, AliasPartIndex>(x => x.Alias == alias.ToLowerInvariant()).FirstOrDefaultAsync();
}
}
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public override void ConfigureServices(IServiceCollection services)
var session = context.Services.GetRequiredService<ISession>();
var contentItem = await session.Query<ContentItem, AliasPartIndex>(x =>
x.Published && x.Alias.Equals(alias, System.StringComparison.InvariantCultureIgnoreCase))
x.Published && x.Alias == alias.ToLowerInvariant())
.FirstOrDefaultAsync();
if (contentItem == null)
Expand Down

0 comments on commit 1dbd790

Please sign in to comment.