XSI_TYPE in vocabs not serialized due to logical error
emmanvg opened this issue · comments
Emmanuelle Vargas Gonzalez commented
https://github.com/CybOXProject/python-cybox/blob/master/cybox/common/vocabs.py#L123
Note the right-hand side of the OR
expression will return True
if an XSI_TYPE
and xsi_type
is set making self.is_plain()
return True
which is False
...
Emmanuelle Vargas Gonzalez commented
It affects to_dict()
because it makes use of it, but it can also affect the general code logic when used outside.
Greg Back commented
Can we add a test that demonstrates this? I remember why we made is_plain()
, but I don't really understand the implications of this change.