Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
feat: small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcalvo committed May 10, 2024
1 parent eba5f25 commit a29021b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/argilla_server/apis/v0/handlers/workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from argilla_server.contexts import accounts
from argilla_server.database import get_async_db
from argilla_server.errors import EntityAlreadyExistsError, EntityNotFoundError
from argilla_server.errors.future.base_errors import NotUniqueError
from argilla_server.errors.future import NotUniqueError
from argilla_server.policies import WorkspacePolicy, WorkspaceUserPolicy, authorize
from argilla_server.pydantic_v1 import parse_obj_as
from argilla_server.schemas.v0.users import User
Expand All @@ -42,7 +42,7 @@ async def create_workspace(

try:
workspace = await accounts.create_workspace(db, workspace_create.dict())
except NotUniqueError as e:
except NotUniqueError:
raise EntityAlreadyExistsError(name=workspace_create.name, type=Workspace)

return Workspace.from_orm(workspace)
Expand Down
2 changes: 1 addition & 1 deletion src/argilla_server/apis/v1/handlers/workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from argilla_server.contexts import accounts, datasets
from argilla_server.database import get_async_db
from argilla_server.errors.future.base_errors import NotUniqueError
from argilla_server.errors.future import NotUniqueError
from argilla_server.models import User
from argilla_server.policies import WorkspacePolicyV1, authorize
from argilla_server.schemas.v1.workspaces import Workspace, WorkspaceCreate, Workspaces
Expand Down
2 changes: 1 addition & 1 deletion src/argilla_server/contexts/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from sqlalchemy.orm import Session, selectinload

from argilla_server.enums import UserRole
from argilla_server.errors.future.base_errors import NotUniqueError
from argilla_server.errors.future import NotUniqueError
from argilla_server.models import User, Workspace, WorkspaceUser
from argilla_server.schemas.v0.users import UserCreate
from argilla_server.schemas.v0.workspaces import WorkspaceCreate, WorkspaceUserCreate
Expand Down

0 comments on commit a29021b

Please sign in to comment.