Исправил предупреждение о возможном nullable типе

This commit is contained in:
parent 0594eb84ea
commit c05098c84f

View File

@ -95,7 +95,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
{
var entity = GetTelemetryCache()
.FirstOrDefault(t => t.Well?.Id == idWell);
if (entity.Well?.Timezone is not null && entity.TimeZone.Hours != entity.Well.Timezone.Hours)
if (entity?.Well?.Timezone is not null && entity.TimeZone.Hours != entity.Well.Timezone.Hours)
{
entity.TimeZone = entity.Well.Timezone;
//TODO: выдаем предупреждение!