From 8a45502acbdaeabe78e01fc70cb1f4023b93798b Mon Sep 17 00:00:00 2001 From: ssgueye2 <127868584+ssgueye2@users.noreply.github.com> Date: Tue, 6 Jun 2023 19:03:03 +0200 Subject: [PATCH] #2163 should allowed edge device in the platform (#2177) * Hide certificates when getting the magic ommand * Enable Devices and EdgeDevice in the platform --------- Co-authored-by: Kevin BEAUGRAND Co-authored-by: Kevin BEAUGRAND <9513635+kbeaugrand@users.noreply.github.com> --- .../Mappers/AWS/AWSDeviceThingProfile.cs | 3 +++ .../Jobs/AWS/SyncThingsJob.cs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) 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); }