diff options
author | MichaelMorris <michael.morris@est.tech> | 2023-02-10 13:13:29 +0000 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2023-02-14 11:12:23 +0000 |
commit | a82e610071a2814e34846da0c4548fb43a7e8a4f (patch) | |
tree | e076e6aaa46b080ae540344605b3b420db6581f2 /catalog-be | |
parent | 90aabfaff5773498cd233e0bbc27896db84c9103 (diff) |
Omit tenant metadata when not set
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-4384
Change-Id: I11a389efcc8327bc26831a9331220e018d296c9f
Diffstat (limited to 'catalog-be')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java index 313bef57aa..245fec39b0 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java @@ -583,7 +583,9 @@ public class ToscaExportHandler { } toscaMetadata.put(JsonPresentationFields.SUB_CATEGORY.getPresentation(), categoryDefinition.getSubcategories().get(0).getName()); toscaMetadata.put(JsonPresentationFields.RESOURCE_VENDOR.getPresentation(), resource.getVendorName()); - toscaMetadata.put(JsonPresentationFields.TENANT.getPresentation(), resource.getTenant()); + if (resource.getTenant() != null) { + toscaMetadata.put(JsonPresentationFields.TENANT.getPresentation(), resource.getTenant()); + } toscaMetadata.put(JsonPresentationFields.RESOURCE_VENDOR_RELEASE.getPresentation(), resource.getVendorRelease()); toscaMetadata.put(JsonPresentationFields.RESOURCE_VENDOR_MODEL_NUMBER.getPresentation(), resource.getResourceVendorModelNumber()); break; |