diff options
author | julien zhang <zhang.jun3g@zte.com.cn> | 2016-06-30 16:26:05 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-06-30 16:26:05 +0000 |
commit | d3ec79a8d3146b88892cf6d7fdf843ccd7e3a0b0 (patch) | |
tree | b1f287a28ab17ab70c97ef2a8c6675a15a5e5894 /tosca2heat/tosca-parser/toscaparser/elements | |
parent | f5be8f9bf36a27ed0b8e9beaa63bc0a361e2f77b (diff) | |
parent | 6b4ad25ad60a6e7f508142fe7e0656da349eb556 (diff) |
Merge "Incorrect inheritance of requirements in NodeType"
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/elements')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/elements/entity_type.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py b/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py index 5d620a5..72e7e3f 100644 --- a/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py +++ b/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py @@ -106,8 +106,13 @@ class EntityType(object): value[k] = v if isinstance(value, list): for p_value in parent_value: - if p_value not in value: - value.append(p_value) + if isinstance(p_value, dict): + if p_value.keys()[0] not in [ + item.keys()[0] for item in value]: + value.append(p_value) + else: + if p_value not in value: + value.append(p_value) else: value = copy.copy(parent_value) p = p.parent_type |