mirror of https://github.com/MISP/PyMISP
Return json when adding attributes
parent
6b530db32d
commit
6fef2c60e3
|
@ -409,7 +409,7 @@ class PyMISP(object):
|
|||
else:
|
||||
session = self.__prepare_session()
|
||||
url = urljoin(self.root_url, 'attributes/add/{}'.format(eventID_to_update))
|
||||
response = session.post(url, data=json.dumps(a, cls=EncodeUpdate))
|
||||
response = self._check_response(session.post(url, data=json.dumps(a, cls=EncodeUpdate)))
|
||||
return response
|
||||
|
||||
def add_named_attribute(self, event, type_value, value, category=None, to_ids=False, comment=None, distribution=None, proposal=False, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue