`Observable.from_dict` handles `event` property improperly
apsillers opened this issue · comments
In the simple test case
Observable.from_dict({'event': {'type': {'xsi:type': 'cyboxVocabs:EventTypeVocab-1.0.1', 'value': 'DHCP'} }})
I get the error message TypeError: value must be an Event
for line 248 of observable.py. The line is
obs.event = Object.from_dict(observable_dict.get('event'))
However, it appears this should be Event.from_dict
. The property setter for event
is rejecting the non-Event
output from Object.from_dict
in its if not isinstance(value, Event)
test.
I think this error has been fixed (indirectly), perhaps due to the switch to mixbox (it seems like the code mentioned is no longer there, and I was unable to reproduce the error in a test I just added). I'm going to close this, but feel free to re-open if I misunderstand what was causing the error.