Skip to content

Commit

Permalink
fix: Copy event dictionary when creating a MISPEvent
Browse files Browse the repository at this point in the history
Fix #321
  • Loading branch information
Rafiot committed Feb 12, 2019
1 parent 5afdcb5 commit bd74a11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymisp/api.py
Expand Up @@ -3,6 +3,7 @@

"""Python API using the REST interface of MISP"""

import copy
import sys
import json
import datetime
Expand Down Expand Up @@ -278,7 +279,7 @@ def _make_mispevent(self, event):
"""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
Expand Down

0 comments on commit bd74a11

Please sign in to comment.