From 802fdd10154d106409c73f4e97b1e7e17cc81a88 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Fri, 21 May 2021 11:02:43 +0500 Subject: [PATCH] =?UTF-8?q?bugfix:=20=D0=97=D0=B0=D0=BC=D0=B5=D0=BD=D0=B0?= =?UTF-8?q?=20.Any()=20=D0=BD=D0=B0=20!.Any()=20=D1=82=D0=B0=D0=BC,=20?= =?UTF-8?q?=D0=B3=D0=B4=D0=B5=20=D1=8D=D1=82=D0=BE=20=D0=BD=D0=B5=D0=BE?= =?UTF-8?q?=D0=B1=D1=85=D0=BE=D0=B4=D0=B8=D0=BC=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudInfrastructure/Services/DataService.cs | 2 +- AsbCloudInfrastructure/Services/MessageService.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AsbCloudInfrastructure/Services/DataService.cs b/AsbCloudInfrastructure/Services/DataService.cs index eb769b05..dbddc192 100644 --- a/AsbCloudInfrastructure/Services/DataService.cs +++ b/AsbCloudInfrastructure/Services/DataService.cs @@ -68,7 +68,7 @@ namespace AsbCloudInfrastructure.Services public void UpdateData(string uid, IEnumerable dtos) { - if (dtos == default || dtos.Any()) + if (dtos == default || !dtos.Any()) return; var telemetryId = telemetryService.GetOrCreateTemetryIdByUid(uid); diff --git a/AsbCloudInfrastructure/Services/MessageService.cs b/AsbCloudInfrastructure/Services/MessageService.cs index 4ddd2e38..bf92ae6e 100644 --- a/AsbCloudInfrastructure/Services/MessageService.cs +++ b/AsbCloudInfrastructure/Services/MessageService.cs @@ -35,7 +35,7 @@ namespace AsbCloudInfrastructure.Services var events = cacheEvents.Select(e => e.IdTelemetry == telemetry.Id); - if (events.Any()) + if (!events.Any()) return null; var messages = from m in db.Messages @@ -111,7 +111,7 @@ namespace AsbCloudInfrastructure.Services public void Insert(string uid, IEnumerable dtos) { - if (dtos.Any()) + if (!dtos.Any()) return; var telemetryId = telemetryService.GetOrCreateTemetryIdByUid(uid);