Skip to content

Commit 03757f0

Browse files
committed
fixup! Fix types in version init
1 parent f408441 commit 03757f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

roboflow/core/version.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ def __init__(
102102
version_without_workspace = os.path.basename(str(version))
103103

104104
response = requests.get(f"{API_URL}/{workspace}/{project}/{self.version}?api_key={self.__api_key}")
105-
response.raise_for_status()
106-
version_info = response.json()["version"]
107-
has_model = bool(version_info.get("models"))
105+
if response.ok:
106+
version_info = response.json()["version"]
107+
has_model = bool(version_info.get("models"))
108+
else:
109+
has_model = False
108110

109111
if not has_model:
110112
self.model = None

0 commit comments

Comments
 (0)