mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
chore: format
This commit is contained in:
parent
e0d4c3ec92
commit
10daa64d5b
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue