From 5572000fb5151e9cf3e53750a3da235eca9e0d97 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Thu, 21 Dec 2023 15:33:45 +0500 Subject: [PATCH] DetectedOperationRequest fix initialization of IEnumerables --- AsbCloudApp/Requests/DetectedOperationRequest.cs | 6 +++--- .../Services/DetectOperations/DetectedOperationService.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AsbCloudApp/Requests/DetectedOperationRequest.cs b/AsbCloudApp/Requests/DetectedOperationRequest.cs index 1e38ff7b..dcf66aab 100644 --- a/AsbCloudApp/Requests/DetectedOperationRequest.cs +++ b/AsbCloudApp/Requests/DetectedOperationRequest.cs @@ -20,12 +20,12 @@ namespace AsbCloudApp.Requests /// Список id телеметрий /// пустой список - нет фильтрации /// - public IEnumerable IdsTelemetries { get; set; } = Enumerable.Empty(); + public IEnumerable IdsTelemetries { get; set; } = Array.Empty(); /// /// категории операций /// - public IEnumerable IdsCategories { get; set; } = Enumerable.Empty(); + public IEnumerable IdsCategories { get; set; } = Array.Empty(); /// /// Больше или равно дате @@ -50,7 +50,7 @@ namespace AsbCloudApp.Requests /// /// Фильтр по пользователю панели /// - public int? EqIdTelemetryUser { get; set; } + public int? IdTelemetryUser { get; set; } } } diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs index a65525ad..9691c7fb 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs @@ -199,8 +199,8 @@ namespace AsbCloudInfrastructure.Services.DetectOperations if (request.LeDepth is not null) query = query.Where(o => o.DepthEnd <= request.LeDepth); - if (request.EqIdTelemetryUser is not null) - query = query.Where(o => o.IdUsersAtStart == request.EqIdTelemetryUser); + if (request.IdTelemetryUser is not null) + query = query.Where(o => o.IdUsersAtStart == request.IdTelemetryUser); } return query;