feat(templateMatcher): в процесс синхронизации неиспользованных шаблонов добавлены шаблоны со статусом Error, чтобы поведение было схожим.
This commit is contained in:
@@ -473,7 +473,7 @@ internal class SimpleTemplateSynchronizer : ITemplateSynchronizer
|
|||||||
// Находим все шаблоны со статусом Unused
|
// Находим все шаблоны со статусом Unused
|
||||||
var unusedTemplates = await templateService.Get()
|
var unusedTemplates = await templateService.Get()
|
||||||
.Include(t => t.Unit)
|
.Include(t => t.Unit)
|
||||||
.Where(t => t.StatusTypeId == TemplateStatusTypeEnum.Unused)
|
.Where(t => t.StatusTypeId == TemplateStatusTypeEnum.Unused || t.StatusTypeId == TemplateStatusTypeEnum.Error)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
if (!unusedTemplates.Any())
|
if (!unusedTemplates.Any())
|
||||||
@@ -519,7 +519,7 @@ internal class SimpleTemplateSynchronizer : ITemplateSynchronizer
|
|||||||
LastRun = template.LastRun,
|
LastRun = template.LastRun,
|
||||||
NextRun = nextRun,
|
NextRun = nextRun,
|
||||||
Index = null,
|
Index = null,
|
||||||
StatusTypeId = TemplateStatusTypeEnum.Unused,
|
StatusTypeId = template.StatusTypeId,
|
||||||
Initiator = initiator,
|
Initiator = initiator,
|
||||||
UnitsInTemplate = new List<Guid>()
|
UnitsInTemplate = new List<Guid>()
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user