Skip to content

Commit

Permalink
Use repo_type in HfApi.grant_access url (#2551)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvillanova authored Sep 18, 2024
1 parent f1a7ed4 commit 64bcff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/huggingface_hub/hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8973,7 +8973,7 @@ def grant_access(
repo_type = constants.REPO_TYPE_MODEL

response = get_session().post(
f"{constants.ENDPOINT}/api/models/{repo_id}/user-access-request/grant",
f"{constants.ENDPOINT}/api/{repo_type}s/{repo_id}/user-access-request/grant",
headers=self._build_hf_headers(token=token),
json={"user": user},
)
Expand Down

0 comments on commit 64bcff5

Please sign in to comment.