Resolve issue with change_sharing_group which do not update event successfully.

pull/385/head
hrifflet 2019-04-30 15:12:08 +00:00
parent 7d6b79216c
commit 56f80960f2
1 changed files with 3 additions and 1 deletions

View File

@ -513,7 +513,9 @@ class PyMISP(object):
"""Change the sharing group of an event"""
e = self._make_mispevent(event)
e.distribution = 4 # Needs to be 'Sharing group'
e.sharing_group_id = sharing_group_id
if e.SharingGroup: # Delete former SharingGroup information
del e.SharingGroup
e.sharing_group_id = sharing_group_id # Set new sharing group id
return self.update(e)
def new_event(self, distribution=None, threat_level_id=None, analysis=None, info=None, date=None, published=False, orgc_id=None, org_id=None, sharing_group_id=None):