We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0d1daea + d53f9fa commit d4ea8d3Copy full SHA for d4ea8d3
1 file changed
qfieldcloud_sdk/sdk.py
@@ -898,13 +898,17 @@ def list_jobs(
898
)
899
```
900
"""
901
+ params = {
902
+ "project_id": project_id,
903
+ }
904
+
905
+ if job_type:
906
+ params["type"] = job_type.value
907
908
payload = self._request_json(
909
"GET",
910
"jobs/",
- {
- "project_id": project_id,
- "type": job_type.value if job_type else None,
- },
911
+ params=params,
912
pagination=pagination,
913
914
return cast(List, payload)
@@ -1898,6 +1902,9 @@ def _request(
1898
1902
headers_copy = {**headers}
1899
1903
1900
1904
assert self.url
1905
+ assert method != "GET" or not data, (
1906
+ "GET requests must not have `data` values passed, use `params` instead"
1907
+ )
1901
1908
1909
allow_redirects = method != "POST"
1910
0 commit comments