Merge pull request #95 from RichieB2B/ncsc-nl/send-attributes

Return json when adding attributes
pull/66/head
Raphaël Vinot 2017-03-31 12:12:02 +02:00 committed by GitHub
commit 4f694ba389
1 changed files with 1 additions and 1 deletions

View File

@ -417,7 +417,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):