Доработка после ревью-2

This commit is contained in:
Olga Nemt 2024-04-17 16:17:52 +05:00
parent 411e420a61
commit ef8d559739
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ namespace AsbCloudApp.Data
/// <summary>
/// Скважина
/// </summary>
public WellDto Well { get; set; } = new();
public WellDto Well { get; set; } = null!;
/// <summary>
/// Операции по скважине

View File

@ -147,7 +147,7 @@ namespace AsbCloudInfrastructure.Services
var categoriesDict = categories.ToDictionary(s => s.Id, s => s.Name);
var wells = await wellService.GetAsync(new WellRequest { Ids = idsWells }, token);
var wellsDict = wells.ToDictionary(w => w.Id, w => w.Caption);
var wellsDict = wells.ToDictionary(w => w.Id);
var idsWellSectionTypes = WellSectionTypesWithCategories.Select(t => t.IdSectionType).Distinct();
var usedCategories = WellSectionTypesWithCategories.Select(c => c.IdCategory).Distinct();
@ -215,7 +215,7 @@ namespace AsbCloudInfrastructure.Services
Well = new WellDto()
{
Id = o.Key,
Caption = wellsDict.TryGetValue(o.Key, out string? caption) ? caption : string.Empty,
Caption = wellsDict[o.Key].Caption,
}
});