From e5eb703a12bcc55f83371224aa808b56c25b5b23 Mon Sep 17 00:00:00 2001 From: Michael Pisman Date: Thu, 12 Oct 2023 23:21:07 -0600 Subject: [PATCH] fix: Resolved circular import --- src/unipoll_api/schemas/policy.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/unipoll_api/schemas/policy.py b/src/unipoll_api/schemas/policy.py index 08e97e8..cf71dfe 100644 --- a/src/unipoll_api/schemas/policy.py +++ b/src/unipoll_api/schemas/policy.py @@ -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): @@ -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": [