From 94cd2fd52eeebdc118045bdb834d2b047b432205 Mon Sep 17 00:00:00 2001 From: Arcuri Davide Date: Thu, 4 Jan 2018 08:53:43 +0100 Subject: [PATCH] _default_attributes_parameters - if set - is a dict Manage distribution and sharing_group_id as dict key like the other fields. -- Not sure about default --- pymisp/mispevent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index a7f2eeb..01444cc 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -784,8 +784,8 @@ class MISPObject(AbstractMISP): self._default_attributes_parameters.pop('category', None) # depends on the value self._default_attributes_parameters.pop('deleted', None) # doesn't make sense to pre-set it self._default_attributes_parameters.pop('data', None) # in case the original in a sample or an attachment - self.distribution = self._default_attributes_parameters.distribution - self.sharing_group_id = self._default_attributes_parameters.sharing_group_id + self.distribution = self._default_attributes_parameters.pop('distribution', 5) + self.sharing_group_id = self._default_attributes_parameters.pop('sharing_group_id', None) else: self.distribution = 5 # Default to inherit self.sharing_group_id = None