chg: [internal] Optimise clamav to avoid JSON decoding/encoding

pull/648/head
Jakub Onderka 2024-01-06 12:11:35 +01:00
parent cbaa2f85a2
commit 57e04d6b6c
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ def create_response(original_attribute: dict, software: str, signature: Optional
av_signature_object.add_reference(original_attribute["uuid"], "belongs-to")
misp_event.add_object(av_signature_object)
event = json.loads(misp_event.to_json())
event = misp_event.to_dict()
results = {key: event[key] for key in ('Attribute', 'Object') if (key in event and event[key])}
return {"results": results}