Skip to content

Commit b10d84d

Browse files
committed
[hf_api] create_repo: if exist_ok, still return url
1 parent 833d703 commit b10d84d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/huggingface_hub/hf_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ def create_repo(
178178
json=json,
179179
)
180180
if exist_ok and r.status_code == 409:
181-
return ""
181+
d = r.json()
182+
return d["url"]
182183
r.raise_for_status()
183184
d = r.json()
184185
return d["url"]

0 commit comments

Comments
 (0)