Skip to content

Commit ba30f76

Browse files
authored
Merge pull request #109 from Runware/fix-model-upload
Model Uploading Fixes
2 parents dd503c3 + 93be66f commit ba30f76

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

runware/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,10 +1279,14 @@ def check(resolve: callable, reject: callable, *args: Any) -> bool:
12791279
raise RunwareAPIError(uploaded_model)
12801280

12811281
status = uploaded_model.get("status")
1282+
12821283
if status not in unique_statuses:
12831284
all_models.append(uploaded_model)
12841285
unique_statuses.add(status)
12851286

1287+
if status is not None and "error" in status:
1288+
raise RunwareAPIError(uploaded_model)
1289+
12861290
if status == "ready":
12871291
uploaded_model_list.remove(uploaded_model)
12881292
if not uploaded_model_list:

runware/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ class IUploadModelBaseType:
611611
downloadURL: str
612612
uniqueIdentifier: str
613613
version: str
614-
format: int
614+
format: str
615615
private: bool
616616
category: str
617617
heroImageURL: Optional[str] = None

0 commit comments

Comments
 (0)