diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index 5a9ed51..1b665c8 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -846,6 +846,8 @@ class MISPObjectAttribute(MISPAttribute): if self.to_ids is None: # Same for the to_ids flag self.to_ids = self._definition.get('to_ids') + if not self.type: + raise NewAttributeError("The type of the attribute is required. Is the object template missing?") super(MISPObjectAttribute, self).from_dict(**dict(self, **kwargs)) def __repr__(self):