Skip to content

Commit ae211ca

Browse files
authored
Update sde_collections/sinequa_api.py
1 parent 04286f8 commit ae211ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sde_collections/sinequa_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ def process_response(self, url: str, payload: dict[str, Any]) -> Any:
7373
return meaningful_response
7474

7575
def query(self, page: int, collection_config_folder: str = "") -> Any:
76-
url = f"{self.base_url}/api/v1/search.query?Password={self.password}&User={self.user}"
76+
if self.server_name:
77+
url = f"{self.base_url}/api/v1/search.query?Password={self.password}&User={self.user}"
78+
else:
79+
url = f"{self.base_url}/api/v1/search.query"
7780
payload = {
7881
"app": self.app_name,
7982
"query": {

0 commit comments

Comments
 (0)