fix: [server] Serializing PyMISP objects

pull/651/head
Jakub Onderka 2024-01-09 12:19:48 +01:00
parent 9446fd2ac6
commit 5b57b8b296
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import tornado.process
from tornado.ioloop import IOLoop
from tornado.concurrent import run_on_executor
from concurrent.futures import ThreadPoolExecutor
from pymisp import pymisp_json_default
try:
from .modules import * # noqa
@ -202,7 +203,7 @@ class QueryModule(tornado.web.RequestHandler):
response = module.dict_handler(request=dict_payload)
else:
response = module.handler(q=json_payload)
return json.dumps(response)
return json.dumps(response, default=pymisp_json_default)
@tornado.gen.coroutine
def post(self):