Commit 3e28c960d3be57fcd9adfce1f6625ff35d81edb7
1 parent
f566bff8
UI: Fixed updated deviceProfile in bulk import devices
Showing
1 changed file
with
4 additions
and
1 deletions
... | ... | @@ -869,7 +869,7 @@ export class EntityService { |
869 | 869 | return findEntityObservable.pipe( |
870 | 870 | mergeMap((entity) => { |
871 | 871 | const tasks: Observable<any>[] = []; |
872 | - const result: Device | Asset = entity as (Device | Asset); | |
872 | + const result: Device & Asset = entity as (Device | Asset); | |
873 | 873 | const additionalInfo = result.additionalInfo || {}; |
874 | 874 | if (result.label !== entityData.label || |
875 | 875 | result.type !== entityData.type || |
... | ... | @@ -882,6 +882,9 @@ export class EntityService { |
882 | 882 | if (result.id.entityType === EntityType.DEVICE) { |
883 | 883 | result.additionalInfo.gateway = entityData.gateway; |
884 | 884 | } |
885 | + if (result.id.entityType === EntityType.DEVICE && result.deviceProfileId) { | |
886 | + delete result.deviceProfileId; | |
887 | + } | |
885 | 888 | switch (result.id.entityType) { |
886 | 889 | case EntityType.DEVICE: |
887 | 890 | tasks.push(this.deviceService.saveDevice(result, config)); | ... | ... |