Skip to content

Commit 9ccabb2

Browse files
committed
added none check to enum value parser to avoid an exception when encountering empty enum values
1 parent c4e7849 commit 9ccabb2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

reqif/parsers/attribute_definition_parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ def parse_attribute_definitions(
208208
xml_values = xml_attribute_value.find("VALUES")
209209
if xml_values is not None:
210210
xml_enum_value_ref = xml_values.find("ENUM-VALUE-REF")
211-
default_value = xml_enum_value_ref.text
211+
if xml_enum_value_ref is not None:
212+
default_value = xml_enum_value_ref.text
212213
else:
213214
raise NotImplementedError
214215
elif attribute_definition.tag == "ATTRIBUTE-DEFINITION-DATE":

0 commit comments

Comments
 (0)