Highlighter issue

This commit is contained in:
dingo
2026-04-14 13:16:47 -04:00
parent f76814a03b
commit 7a88fd96b9
@@ -159,8 +159,12 @@ else
_message = null;
try
{
var normalizedType = row.Config.HighlightType.Trim();
var normalizedTypeLower = normalizedType.ToLowerInvariant();
row.Config.HighlightType = normalizedType;
var tracked = await Db.HighlightConfigs
.FirstOrDefaultAsync(h => string.Equals(h.HighlightType, row.Config.HighlightType, StringComparison.OrdinalIgnoreCase));
.FirstOrDefaultAsync(h => h.HighlightType.ToLower() == normalizedTypeLower);
if (tracked is null)
{
@@ -181,7 +185,7 @@ else
_isError = false;
// Re-attach the tracked entity to the row so future saves go through the tracked path.
if (!Db.HighlightConfigs.Local.Any(h => h.HighlightType == row.Config.HighlightType))
if (!Db.HighlightConfigs.Local.Any(h => string.Equals(h.HighlightType, row.Config.HighlightType, StringComparison.OrdinalIgnoreCase)))
Db.Entry(row.Config).State = Microsoft.EntityFrameworkCore.EntityState.Detached;
}
catch (Exception ex)