fix(core,dal): Устранены возможные случаи реализации шорткодов по шаблону с Id 00000000-0000-0000-0000-000000000000

This commit is contained in:
Mikhail Kuznetsov
2026-05-07 14:35:11 +10:00
parent 1233d9b4fe
commit 0235fe0028
2 changed files with 5 additions and 4 deletions

View File

@@ -163,7 +163,8 @@ namespace PARR.Core.Services.Shortcodes
}
// Сохранение в кэш (только если были изменения)
if (!string.IsNullOrEmpty(result) && result != str)
// Нельзя писать template.Id == Guid.Empty, так как id для новых шаблонов 0000-000-000000 и будет не верно реализован шорт-код
if (!string.IsNullOrEmpty(result) && result != str && template.Id != Guid.Empty)
{
var toCache = new ShortcodesResult
{