Skip to content

Commit

Permalink
fix: Resolved circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-pisman committed Oct 13, 2023
1 parent 05db0f0 commit e5eb703
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/unipoll_api/schemas/policy.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
from typing import Literal, Any, Optional
from pydantic import ConfigDict, BaseModel, Field
from unipoll_api.documents import ResourceID, Account, Group
from unipoll_api.utils.permissions import Permissions


class Policy(BaseModel):
id: ResourceID
policy_holder_type: Literal["account", "group"]
policy_holder: Account | Group
permissions: Permissions
permissions: int


class PolicyShort(BaseModel):
Expand Down Expand Up @@ -97,7 +96,7 @@ class PolicyList(BaseModel):

# Schema for adding permissions to a group
class AddPermission(BaseModel):
permissions: list[Permissions] = Field(title="Permissions")
permissions: list[str] = Field(title="Permissions")
model_config = ConfigDict(json_schema_extra={
"example": {
"permissions": [
Expand Down

0 comments on commit e5eb703

Please sign in to comment.