diff --git a/AsbCloudInfrastructure/Services/WellService.cs b/AsbCloudInfrastructure/Services/WellService.cs index 679da469..f34d68a6 100644 --- a/AsbCloudInfrastructure/Services/WellService.cs +++ b/AsbCloudInfrastructure/Services/WellService.cs @@ -110,6 +110,7 @@ namespace AsbCloudInfrastructure.Services return dto; } + public async Task GetWellCaptionByIdAsync(int idWell, CancellationToken token) { var entity = await cacheWells.FirstOrDefaultAsync(w => w.Id == idWell, token).ConfigureAwait(false); @@ -144,8 +145,8 @@ namespace AsbCloudInfrastructure.Services { Id = well.Id, Caption = well.Caption, - Cluster = well.Cluster.Caption, - Deposit = well.Cluster.Deposit.Caption, + Cluster = well.Cluster?.Caption, + Deposit = well.Cluster?.Deposit?.Caption, LastTelemetryDate = GetLastTelemetryDate(well.Id), IdWellType = well.IdWellType ?? default, IdState = well.IdState, diff --git a/AsbCloudWebApi/appsettings.json b/AsbCloudWebApi/appsettings.json index 234b99e3..55675a79 100644 --- a/AsbCloudWebApi/appsettings.json +++ b/AsbCloudWebApi/appsettings.json @@ -7,7 +7,7 @@ } }, "ConnectionStrings": { - "DefaultConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True;Include Error Detail=True", + "DefaultConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True", "DebugConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True;Include Error Detail=True", "ServerConnection": "Host=192.168.1.70;Database=postgres;Username=postgres;Password=q;Persist Security Info=True", "LocalConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True"