From 4cba073b7c327d239cf4caaf5251dde229149bf2 Mon Sep 17 00:00:00 2001 From: dpinkevych Date: Wed, 11 Nov 2026 15:47:18 +0200 Subject: [PATCH] fix(iot-hub): an entity the user had and chose to use is not tracked as the package's After Back reruns the entity steps, the "use existing" mark of such an entity is gone from the install state, so the server took it for the package's and a later update or Delete removed the user's own entity. The wizard no longer tracks it, unless it created that entity itself earlier in the same wizard. --- .../device-install-dialog/device-install-dialog.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts index a25b364162..6c67832f13 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts @@ -818,7 +818,10 @@ export class TbDeviceInstallDialogComponent extends DialogComponent known.id === output.id)) { + // An entity the user had before the install and chose to use is not the package's: a later update or Delete must + // not remove it, even after Back reruns the steps and its "use existing" mark is gone from the install state. + const packageOwned = resolution !== 'use-existing' || this.createdInThisWizard.has(output.id); + if (entityType && packageOwned && !this.packageEntityIds.some(known => known.id === output.id)) { this.packageEntityIds.push({ entityType, id: output.id }); } const alias = stepTypeAliasMap[ep.step.type];