From 10daa64d5b17008eeaf21f5619044a98c140f2c6 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 2 Mar 2026 17:26:18 -0600 Subject: [PATCH] chore: format --- backend/open_webui/utils/access_control/files.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/utils/access_control/files.py b/backend/open_webui/utils/access_control/files.py index 0be12b9d01..e3d52b0f55 100644 --- a/backend/open_webui/utils/access_control/files.py +++ b/backend/open_webui/utils/access_control/files.py @@ -78,8 +78,11 @@ def has_access_to_file( for model in Models.get_models_by_user_id(user.id, permission=access_type, db=db): knowledge_items = getattr(model.meta, "knowledge", None) or [] for item in knowledge_items: - if isinstance(item, dict) and item.get("type") == "file" and item.get("id") == file.id: + if ( + isinstance(item, dict) + and item.get("type") == "file" + and item.get("id") == file.id + ): return True return False -