From 99fa1d83a72d0236b37fd9158afeb06a8ef47c35 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Fri, 28 Jul 2023 15:27:38 +0500 Subject: [PATCH 1/2] UserSettingsController rename Delete method --- AsbCloudWebApi/Controllers/UserSettingsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsbCloudWebApi/Controllers/UserSettingsController.cs b/AsbCloudWebApi/Controllers/UserSettingsController.cs index 9d0f5c99..e3e47327 100644 --- a/AsbCloudWebApi/Controllers/UserSettingsController.cs +++ b/AsbCloudWebApi/Controllers/UserSettingsController.cs @@ -94,7 +94,7 @@ namespace AsbCloudWebApi.Controllers /// [HttpDelete("/api/admin/user/{idUser}/settings")] [Permission] - public virtual async Task> DeleteAsync(int idUser, CancellationToken token) + public virtual async Task> DeleteAllAsync(int idUser, CancellationToken token) { var result = await service.DeleteAsync(idUser, token).ConfigureAwait(false); From f6ac5b5a98a763312146e34ebbcc602db857020d Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Fri, 28 Jul 2023 15:28:30 +0500 Subject: [PATCH 2/2] OperationsStatService.GetTvdAsync() Fin exception then empty operations. --- .../Services/WellOperationService/OperationsStatService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs index ea74cd8b..2757dbfd 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs @@ -431,6 +431,9 @@ namespace AsbCloudInfrastructure.Services.WellOperationService var tzOffsetHours = wellService.GetTimezone(idWell).Hours; var merged = MergeArraysBySections(sectionsIds, wellOperationsPlan, wellOperationsFact).ToList(); + if (merged.Count ==0) + return Enumerable.Empty>(); + var tvd = new List>(merged.Count); var (Plan, Fact) = merged.FirstOrDefault(); var dateStart = Plan?.DateStart ?? Fact!.DateStart;