_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
pull/165/head
Arcuri Davide 2018-01-04 08:53:43 +01:00
parent c68b69b422
commit 94cd2fd52e
1 changed files with 2 additions and 2 deletions

View File

@ -784,8 +784,8 @@ class MISPObject(AbstractMISP):
self._default_attributes_parameters.pop('category', None) # depends on the value 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('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._default_attributes_parameters.pop('data', None) # in case the original in a sample or an attachment
self.distribution = self._default_attributes_parameters.distribution self.distribution = self._default_attributes_parameters.pop('distribution', 5)
self.sharing_group_id = self._default_attributes_parameters.sharing_group_id self.sharing_group_id = self._default_attributes_parameters.pop('sharing_group_id', None)
else: else:
self.distribution = 5 # Default to inherit self.distribution = 5 # Default to inherit
self.sharing_group_id = None self.sharing_group_id = None