fix: undefined variable in event delegation

pull/923/head
Raphaël Vinot 2023-02-10 13:44:30 +01:00
parent 2aba1bc667
commit 8b1ae28cc9
1 changed files with 1 additions and 1 deletions

View File

@ -3097,7 +3097,7 @@ class PyMISP:
data = {'event_id': event_id, 'org_id': organisation_id, 'distribution': distribution, 'message': message}
r = self._prepare_request('POST', f'eventDelegations/delegateEvent/{event_id}', data=data)
elif event_delegation:
r = self._prepare_request('POST', f'eventDelegations/delegateEvent/{event_id}', data=event_delegation)
r = self._prepare_request('POST', f'eventDelegations/delegateEvent/{event_delegation.event_id}', data=event_delegation)
else:
raise PyMISPError('Either event and organisation OR event_delegation are required.')
delegation_j = self._check_json_response(r)