Highlighter issue
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user