From e96b6464b4f602066cf181cdcc7dd13b8870153d Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 31 Aug 2026 00:33:05 -0400 Subject: [PATCH] refac --- backend/open_webui/models/prompts.py | 4 ++-- backend/open_webui/models/tools.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/open_webui/models/prompts.py b/backend/open_webui/models/prompts.py index 5d07d65833..ed6bc35950 100644 --- a/backend/open_webui/models/prompts.py +++ b/backend/open_webui/models/prompts.py @@ -87,7 +87,7 @@ class PromptForm(BaseModel): data: dict | None = None meta: dict | None = None tags: list[str | None] = None - access_grants: list[dict | None] = None + access_grants: list[dict] | None = None version_id: str | None = None # Active version commit_message: str | None = None # For history tracking is_production: bool | None = True # Whether to set new version as production @@ -100,7 +100,7 @@ class PromptsTable: async def _to_prompt_model( self, prompt: Prompt, - access_grants: list[AccessGrantModel | None] = None, + access_grants: list[AccessGrantModel] | None = None, db: AsyncSession | None = None, ) -> PromptModel: prompt_model = PromptModel.model_validate(prompt) diff --git a/backend/open_webui/models/tools.py b/backend/open_webui/models/tools.py index 24e019aea9..ddb4d78581 100644 --- a/backend/open_webui/models/tools.py +++ b/backend/open_webui/models/tools.py @@ -89,7 +89,7 @@ class ToolForm(BaseModel): name: str content: str meta: ToolMeta - access_grants: list[dict | None] = None + access_grants: list[dict] | None = None class ToolValves(BaseModel): @@ -103,7 +103,7 @@ class ToolsTable: async def _to_tool_model( self, tool: Tool, - access_grants: list[AccessGrantModel | None] = None, + access_grants: list[AccessGrantModel] | None = None, db: AsyncSession | None = None, ) -> ToolModel: tool_model = ToolModel.model_validate(tool)