fix: Copy event dictionary when creating a MISPEvent

Fix #321
pull/347/head
Raphaël Vinot 2019-02-13 00:12:34 +01:00
parent 5afdcb5709
commit bd74a11e2f
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
"""Python API using the REST interface of MISP"""
import copy
import sys
import json
import datetime
@ -278,7 +279,7 @@ class PyMISP(object):
"""Transform a Json MISP event into a MISPEvent"""
if not isinstance(event, MISPEvent):
e = MISPEvent(self.describe_types)
e.load(event)
e.load(copy.copy(event))
else:
e = event
return e