Skip to content

Commit a314d81

Browse files
committed
Closes UNB-2521 [CLIENT] Remove id from POST query params
1 parent 3feb6ea commit a314d81

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Changed
1111

12-
* `requirements_txt_file` no longer optional for model uploads.
12+
* `requirements_txt_file` no longer optional for model uploads.
13+
* Remove `id` from POST params to API server.
1314

1415
### Fixed
1516

unboxapi/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def upload_blob_s3(
172172
)
173173
if res.ok:
174174
body["storageUri"] = presigned_json["storageUri"]
175-
return self.post_request(f"{endpoint}?id={presigned_json['id']}", body=body)
175+
return self.post_request(f"{endpoint}", body=body)
176176
else:
177177
self._raise_on_respose(res)
178178

@@ -199,7 +199,7 @@ def upload_blob_gcs(
199199
)
200200
if res.ok:
201201
body["storageUri"] = presigned_json["storageUri"]
202-
return self.post_request(f"{endpoint}?id={presigned_json['id']}", body=body)
202+
return self.post_request(f"{endpoint}", body=body)
203203
else:
204204
self._raise_on_respose(res)
205205

@@ -229,7 +229,7 @@ def upload_blob_azure(
229229
)
230230
if res.ok:
231231
body["storageUri"] = presigned_json["storageUri"]
232-
return self.post_request(f"{endpoint}?id={presigned_json['id']}", body=body)
232+
return self.post_request(f"{endpoint}", body=body)
233233
else:
234234
self._raise_on_respose(res)
235235

@@ -245,4 +245,4 @@ def transfer_blob(self, endpoint: str, file_path: str, object_name: str, body=No
245245
raise UnboxException(f"Directory {blob_path} cannot be created")
246246
shutil.copyfile(file_path, f"{blob_path}/{object_name}")
247247
body["storageUri"] = f"local://{blob_path}"
248-
return self.post_request(f"{endpoint}?id={id}", body=body)
248+
return self.post_request(f"{endpoint}", body=body)

0 commit comments

Comments
 (0)