chg: More flexibility when loading an object from python dict

pull/317/head
Raphaël Vinot 2018-12-19 11:44:42 +01:00
parent 5de57816dd
commit b72aa536aa
1 changed files with 2 additions and 0 deletions

View File

@ -1001,6 +1001,8 @@ class MISPObject(AbstractMISP):
raise PyMISPError('All the attributes have to be of type MISPObjectReference.')
def from_dict(self, **kwargs):
if kwargs.get('Object'):
kwargs = kwargs.get('Object')
if self._known_template:
if kwargs.get('template_uuid') and kwargs['template_uuid'] != self.template_uuid:
if self._strict: