diff options
author | 2023-08-31 14:45:18 +0100 | |
---|---|---|
committer | 2023-09-04 09:49:09 +0000 | |
commit | db7c4875fb9336088b9a74f34f6f539950cdb344 (patch) | |
tree | 30d50d6c3235a9bdb2c102cd0232db96079553a7 /catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts | |
parent | 34f2113acd7f8f75de1e3184d0a5e0449ceba301 (diff) |
Implicit attributes in get_attribute list
Issue-ID: SDC-4612
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: Id2f3e1f88470e0337a84868f2a66bc53e131e55b
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts index 5f5c2b60ee..67df3e46e1 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts @@ -409,8 +409,10 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges { } private addPropertyToDropdown(propertyDropdownValue: PropertyDropdownValue, propertyList: Array<PropertyDropdownValue>): void { - propertyList.push(propertyDropdownValue); - propertyList.sort((a, b) => a.propertyLabel.localeCompare(b.propertyLabel)); + if (!propertyList.find(prop => prop.propertyName === propertyDropdownValue.propertyName)) { + propertyList.push(propertyDropdownValue); + propertyList.sort((a, b) => a.propertyLabel.localeCompare(b.propertyLabel)); + } } private addPropertiesToDropdown(properties: Array<PropertyBEModel | AttributeBEModel>, propertyList: Array<PropertyDropdownValue>): void { |