Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 8405c5b

Browse files
[client] Remove mutable default argument from OpenCTIApiClient.query (#546)
1 parent 22e1078 commit 8405c5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pycti/api/opencti_api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def set_retry_number(self, retry_number):
215215
"" if retry_number is None else str(retry_number)
216216
)
217217

218-
def query(self, query, variables={}):
218+
def query(self, query, variables=None):
219219
"""submit a query to the OpenCTI GraphQL API
220220
221221
:param query: GraphQL query string
@@ -225,7 +225,7 @@ def query(self, query, variables={}):
225225
:return: returns the response json content
226226
:rtype: Any
227227
"""
228-
228+
variables = variables or {}
229229
query_var = {}
230230
files_vars = []
231231
# Implementation of spec https://github.com/jaydenseric/graphql-multipart-request-spec

0 commit comments

Comments
 (0)