feat(templateGeneratorWorker): добавлена проверка на существование шаблона пришедшего на создание

This commit is contained in:
Mikhail Kuznetsov
2025-08-21 11:28:39 +10:00
parent 5b8526cf4e
commit bc2f9b9055
2 changed files with 17 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ namespace PARR.DAL.DomainServices.Implementations
.ThenInclude(t => t.FieldFilters)
.Include(t => t.UnitFilters)
.ThenInclude(t => t.RelationshipFilters)
.Include(t => t.Group)
.FirstOrDefaultAsync(t => t.Id == jobId);
if (job == null)
@@ -94,6 +95,10 @@ namespace PARR.DAL.DomainServices.Implementations
}
}
}
if (job.Group?.IsUmbrella == true)
query = query.Where(t => t.ChildUnits.Count() >= job.MinValueRelationships && t.ChildUnits.Count() <= job.MaxValueRelationships);
var newUnits = await query.Select(t => t.Id).ToListAsync();
result.AddRange(newUnits);
}