Merge pull request #385 from l3m0ntr33/master

Resolve issue with change_sharing_group which do not update event suc…
pull/393/head
Raphaël Vinot 2019-05-08 16:31:42 +02:00 committed by GitHub
commit 767859c264
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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):