fix(scheduleSync, templateSync): игнор культуры, фильтр шаблонов и расписаний без учета ЗО в префиксе (имени)

This commit is contained in:
Mikhail Trubnikov
2024-02-15 13:47:34 +10:00
parent f4304ea45a
commit 65ff13af08
3 changed files with 12 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ namespace PARR.EsppTemplateSync
var currentCulture = Thread.CurrentThread.CurrentCulture;
//if (!string.IsNullOrEmpty(settingsFromDb.TemplatePrefixName) || !templateName.StartsWith(settingsFromDb.TemplatePrefixName, true, currentCulture))
if (!string.IsNullOrEmpty(settingsFromDb.TemplatePrefixWithoutVariable) || !templateName.Contains(settingsFromDb.TemplatePrefixWithoutVariable, StringComparison.CurrentCultureIgnoreCase))
if (!string.IsNullOrEmpty(settingsFromDb.TemplatePrefixWithoutVariable) || !templateName.Contains(settingsFromDb.TemplatePrefixWithoutVariable)) // , StringComparison.CurrentCultureIgnoreCase
{
logger.LogWarning($"Имя шаблона не соответствует обязательному префиксу({settingsFromDb.TemplatePrefixWithoutVariable}). Шаблон {templateName} игнорирован");
return null;