From 40ce7acb41c3e6e66c321204afcf64178130fc5e Mon Sep 17 00:00:00 2001 From: Mikhail Kuznetsov Date: Mon, 22 Sep 2025 15:56:58 +1000 Subject: [PATCH] =?UTF-8?q?fix(api):=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BC=D0=B0=D0=BF=D0=BF=D0=B8=D0=BD=D0=B3?= =?UTF-8?q?=20Field=20=D0=B2=20FieldFilter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PARR.API/MappingProfiles/DomainToResponseProfile.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/PARR.API/MappingProfiles/DomainToResponseProfile.cs b/PARR.API/MappingProfiles/DomainToResponseProfile.cs index e9511a2e..b00ce527 100644 --- a/PARR.API/MappingProfiles/DomainToResponseProfile.cs +++ b/PARR.API/MappingProfiles/DomainToResponseProfile.cs @@ -121,14 +121,15 @@ namespace PARR.API.MappingProfiles .ForMember(d => d.Attributes, o => o.MapFrom(s => s.UnitValues.GroupBy(g => g.Field) .Select(fieldGroup => new AttributeResponse { - Field = new FieldResponse { + Field = new FieldResponse + { Id = fieldGroup.Key!.Id, - Name = string.IsNullOrEmpty(fieldGroup.Key.DisplayName)? fieldGroup.Key.AihitName: fieldGroup.Key.DisplayName, - IsMultipleValue = fieldGroup.Key.IsMultipleValue + Name = string.IsNullOrEmpty(fieldGroup.Key.DisplayName) ? fieldGroup.Key.AihitName : fieldGroup.Key.DisplayName, + IsMultipleValue = fieldGroup.Key.IsMultipleValue }, Values = fieldGroup.Select(s => new UnitFieldValueResponse { Id = s.ValueId, Value = s.Value!.Value }).ToList() } - ) + ) )); #endregion @@ -317,7 +318,8 @@ namespace PARR.API.MappingProfiles CreateMap(); - CreateMap(); + CreateMap() + .ForMember(d => d.Field, o => o.MapFrom(s => s.UnitField)); CreateMap() .ForMember(d => d.Field, o => o.MapFrom(s => s.UnitField));