fix(templateSync): фикс фильтра шаблонов

This commit is contained in:
Mikhail Trubnikov
2024-02-15 14:53:25 +10:00
parent 65ff13af08
commit 4d7aedbd92

View File

@@ -108,8 +108,9 @@ 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.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;