From 8b1ae28cc9c67a286443204a555d1dbb4e1536e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 10 Feb 2023 13:44:30 +0100 Subject: [PATCH] fix: undefined variable in event delegation --- pymisp/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymisp/api.py b/pymisp/api.py index 082abe8..7c2cfd4 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -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)