Merge pull request 'Исправил предупреждение о возможном nullable типе' (#62) from feature/fix-nullable-warning into dev

Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/62
This commit is contained in:
Никита Фролов 2023-06-27 12:03:16 +05:00
commit b9d60ac6fc

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: выдаем предупреждение!