Skip to content

Commit de24dea

Browse files
committed
Return buffer stream to beginning for exception handling.
1 parent abf2aac commit de24dea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sasctl/_services/model_repository.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,8 @@ def add_model_content(cls, model, file, name, content_type="multipart/form-data"
432432
for item in model_contents:
433433
if item.name == name:
434434
cls.delete("/models/{}/contents/{}".format(id_, item.id))
435+
# Move IO buffer back to start
436+
files["files"][1].seek(0)
435437
return cls.post(
436438
"/models/{}/contents".format(id_),
437439
files=files,

0 commit comments

Comments
 (0)