From 76c39b6d0b2824aa66bf2bc10df8a066a5333e25 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 6 Dec 2024 12:14:06 +0200 Subject: [PATCH] UI: Fixed error toast when editing device detais --- .../ota-package/ota-package-autocomplete.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts b/ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts index 04511fad38..d3570150e8 100644 --- a/ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/ota-package/ota-package-autocomplete.component.ts @@ -31,10 +31,11 @@ import { OtaPackageService } from '@core/http/ota-package.service'; import { PageLink } from '@shared/models/page/page-link'; import { Direction } from '@shared/models/page/sort-order'; import { emptyPageData } from '@shared/models/page/page-data'; -import { getEntityDetailsPageURL } from '@core/utils'; +import { getEntityDetailsPageURL, isDefinedAndNotNull } from '@core/utils'; import { AuthUser } from '@shared/models/user.model'; import { getCurrentAuthUser } from '@core/auth/auth.selectors'; import { Authority } from '@shared/models/authority.enum'; +import { NULL_UUID } from '@shared/models/id/has-uuid'; @Component({ selector: 'tb-ota-package-autocomplete', @@ -76,7 +77,7 @@ export class OtaPackageAutocompleteComponent implements ControlValueAccessor, On if (this.deviceProfile) { this.reset(); } - this.deviceProfile = value; + this.deviceProfile = value ? value :NULL_UUID; } }