Skip to content

Commit

Permalink
Allow models to be saved in "myspace"
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Oct 17, 2024
1 parent b39828a commit 54c0605
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions validation_service_api/validation_service/resources/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,12 @@ async def create_model_instance(
else:
collab_id = project_id_from_space(model_project.space)
if collab_id in special_spaces:
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail=f"Cannot create new model instances in space {collab_id}, please use a private or collab space",
)
if not (
if collab_id != "myspace":
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail=f"Cannot create new model instances in space {collab_id}, please use a private or collab space",
)
elif not (
await user.can_edit_collab(collab_id)
or await user.is_admin()
):
Expand Down

0 comments on commit 54c0605

Please sign in to comment.