Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XSI_TYPE in vocabs not serialized due to logical error #313

Closed
emmanvg opened this issue Feb 26, 2018 · 2 comments
Closed

XSI_TYPE in vocabs not serialized due to logical error #313

emmanvg opened this issue Feb 26, 2018 · 2 comments
Assignees
Milestone

Comments

@emmanvg
Copy link
Contributor

emmanvg commented Feb 26, 2018

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...

@emmanvg emmanvg self-assigned this Feb 26, 2018
@emmanvg
Copy link
Contributor Author

emmanvg commented Feb 26, 2018

It affects to_dict() because it makes use of it, but it can also affect the general code logic when used outside.

@gtback
Copy link
Contributor

gtback commented Feb 27, 2018

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.

@gtback gtback closed this as completed in 8d3f805 Feb 28, 2018
@gtback gtback added this to the v2.1.0.17 milestone Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants