Skip to content

Commit 4eb3f22

Browse files
committed
fix(connectors): eliminate N+1 HTTP requests in MISP connector
1 parent 5ab8e7c commit 4eb3f22

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • api_app/connectors_manager/connectors

api_app/connectors_manager/connectors/misp.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,10 @@ def run(self):
126126
**{k: v for k, v in attr.to_dict().items() if k not in ("type", "value", "uuid")},
127127
)
128128

129-
# add event + all attributes in a single request (bulk optimization)
129+
# single request — event + all attributes sent together
130130
misp_event = misp_instance.add_event(event, pythonify=True)
131131

132-
result = misp_instance.get_event(misp_event.id)
133-
134-
return result
132+
return misp_instance.get_event(misp_event.id)
135133

136134
@classmethod
137135
def _monkeypatch(cls):

0 commit comments

Comments
 (0)