chore: format

This commit is contained in:
Timothy Jaeryang Baek
2026-03-02 17:26:18 -06:00
parent e0d4c3ec92
commit 10daa64d5b

View File

@@ -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