diff --git a/pymisp/api.py b/pymisp/api.py index cd239ac..48ffded 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -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):