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);