This commit is contained in:
Timothy Jaeryang Baek
2025-07-22 11:38:47 +04:00
parent ac0932f356
commit bf3c807047
3 changed files with 11 additions and 10 deletions
+3 -1
View File
@@ -508,7 +508,9 @@ def get_sources_from_items(
# Note Attached
note = Notes.get_note_by_id(item.get("id"))
if user.role == "admin" or has_access(user.id, "read", note.access_control):
if note and (
user.role == "admin" or has_access(user.id, "read", note.access_control)
):
# User has access to the note
query_result = {
"documents": [[note.data.get("content", {}).get("md", "")]],