fix: index out of range in add_object

pull/235/head
Raphaël Vinot 2018-06-05 17:37:49 +02:00
parent 3088998fbb
commit 977400b544
1 changed files with 6 additions and 5 deletions

View File

@ -1895,6 +1895,7 @@ class PyMISP(object):
# NOTE: this slightly fucked up thing is due to the fact template_id was required, and was the 2nd parameter.
template_id = kwargs.get('template_id')
misp_object = kwargs.get('misp_object')
if args:
if isinstance(args[0], MISPObject):
misp_object = args[0]
else: