CD parser: only add ModelRefs for types that don't exist yet

This commit is contained in:
Joeri Exelmans 2024-10-09 15:19:54 +02:00
parent d30844dddd
commit 4c4edf1963

View file

@ -122,7 +122,7 @@ def parse_cd(state, m_text):
if attrs != None:
for attr in attrs:
(optional, attr_type, attr_name, constraint) = attr
# TODO: only create type ref if it doesn't exist yet
if state.read_dict(m, attr_type) == None:
cd.create_model_ref(attr_type, primitive_types[attr_type])
cd.create_attribute_link(class_name, attr_type, attr_name, optional)
if constraint != None: