Return json when adding attributes

pull/66/head
Richard van den Berg 2017-03-31 11:29:02 +02:00
parent 6b530db32d
commit 6fef2c60e3
1 changed files with 1 additions and 1 deletions

View File

@ -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):