summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/tosca_template.py
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tosca_template.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tosca_template.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
index 28fa57b..80cb1cb 100644
--- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py
+++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
@@ -231,12 +231,12 @@ class ToscaTemplate(object):
yaml_dict_tpl=tosca_tpl,
sub_mapped_node_template=nodetemplate)
if nested_template.has_substitution_mappings():
- fnames = \
- [tpl.path for tpl in
- self.nested_tosca_templates_with_topology]
- if fname not in fnames:
- self.nested_tosca_templates_with_topology.\
- append(nested_template)
+ # Record the nested templates in top level template
+ self.nested_tosca_templates_with_topology.\
+ append(nested_template)
+ # Set the substitution toscatemplate for mapped node
+ nodetemplate.sub_mapping_tosca_template = \
+ nested_template
def _validate_field(self):
version = self._tpl_version()