fix: the sharing_group_id isn't required.

pull/171/head
Raphaël Vinot 2018-01-03 18:00:30 +01:00
parent c68b69b422
commit b183d3fd17
1 changed files with 2 additions and 1 deletions

View File

@ -785,7 +785,8 @@ class MISPObject(AbstractMISP):
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
if self._default_attributes_parameters.get('sharing_group_id'):
self.sharing_group_id = self._default_attributes_parameters.sharing_group_id
else:
self.distribution = 5 # Default to inherit
self.sharing_group_id = None