diff --git a/src/AzureIoTHub.Portal.Application/Mappers/AWS/AWSDeviceThingProfile.cs b/src/AzureIoTHub.Portal.Application/Mappers/AWS/AWSDeviceThingProfile.cs index 3f399c2d5..f44127b6b 100644 --- a/src/AzureIoTHub.Portal.Application/Mappers/AWS/AWSDeviceThingProfile.cs +++ b/src/AzureIoTHub.Portal.Application/Mappers/AWS/AWSDeviceThingProfile.cs @@ -4,6 +4,7 @@ namespace AzureIoTHub.Portal.Application.Mappers.AWS { using System.Text; + using Amazon.IoT; using Amazon.IoT.Model; using Amazon.IotData.Model; using AutoMapper; @@ -39,6 +40,7 @@ public AWSDeviceThingProfile() .ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.ThingId)) .ForMember(dest => dest.Name, opts => opts.MapFrom(src => src.ThingName)) .ForMember(dest => dest.Version, opts => opts.MapFrom(src => src.Version)) + .ForMember(dest => dest.IsEnabled, opts => opts.MapFrom(src => true)) .ForMember(dest => dest.Tags, opts => opts.MapFrom(src => src.Attributes.Select(att => new DeviceTagValue { Name = att.Key, @@ -49,6 +51,7 @@ public AWSDeviceThingProfile() .ForMember(dest => dest.Id, opts => opts.MapFrom(src => src.ThingId)) .ForMember(dest => dest.Name, opts => opts.MapFrom(src => src.ThingName)) .ForMember(dest => dest.Version, opts => opts.MapFrom(src => src.Version)) + .ForMember(dest => dest.IsEnabled, opts => opts.MapFrom(src => true)) .ForMember(dest => dest.Tags, opts => opts.MapFrom(src => src.Attributes.Select(att => new DeviceTagValue { Name = att.Key, diff --git a/src/AzureIoTHub.Portal.Infrastructure/Jobs/AWS/SyncThingsJob.cs b/src/AzureIoTHub.Portal.Infrastructure/Jobs/AWS/SyncThingsJob.cs index 9b1d90a11..d1fa6f556 100644 --- a/src/AzureIoTHub.Portal.Infrastructure/Jobs/AWS/SyncThingsJob.cs +++ b/src/AzureIoTHub.Portal.Infrastructure/Jobs/AWS/SyncThingsJob.cs @@ -298,7 +298,6 @@ private async Task CreateOrUpdateEdgeDevice(EdgeDevice edgeDevice) { this.deviceTagValueRepository.Delete(deviceTagEntity.Id); } - _ = this.mapper.Map(edgeDevice, edgeDeviceEntity); this.edgeDeviceRepository.Update(edgeDeviceEntity); }