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];