feat(api,core): Доработка юнит фильтров, инклуды и лог.

This commit is contained in:
Mikhail Trubnikov
2026-10-09 12:08:12 +10:00
parent d6f4368917
commit a611a27c6e
2 changed files with 3 additions and 2 deletions

View File

@@ -65,6 +65,8 @@ namespace PARR.API.Controllers.V1
var jobGroup = await jobGroupService.Get().AsNoTracking()
.Include(t => t.GroupType)
.Include(g => g!.UnitFilters).ThenInclude(uf => uf.FieldFilters).ThenInclude(ff => ff.UnitField)
.Include(g => g!.UnitFilters).ThenInclude(uf => uf.RelationshipFilters).ThenInclude(rf => rf.UnitField)
.FirstAsync(t => t.Id == job.GroupId);
job.Group = jobGroup;

View File

@@ -98,8 +98,7 @@ internal class UnitFilterService : IUnitFilterService
if (unitFiltersList.Count == 0)
{
throw new ArgumentException(
$"Job {job.Id} не содержит фильтров в {nameof(Job.UnitFilters)} или {nameof(JobGroup.UnitFilters)}.",
nameof(job));
$"Работа '{job.Name}' ({job.Id}) не содержит фильтров в группе или работе."/*, nameof(job)*/);
}
var totalStopwatch = Stopwatch.StartNew();