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

This commit is contained in:
Mikhail Trubnikov
2024-02-15 09:21:01 +10:00
parent f217b8dc51
commit f4304ea45a
2 changed files with 9 additions and 4 deletions

View File

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