mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-29 16:35:19 -05:00
fix: opening a note saves it again without any edit (#35017)
Opening or leaving a note saved its text to the server even when nothing in it was touched. Its updated time went up, so reopening a folder that still had notes open in its tabs reordered the folder's newest-first Notes list by load order instead of last edit. Opening or leaving a note without editing it no longer saves its text, and edits still save as before. Fixes #35003
This commit is contained in:
1 parent
02ff1ba72f
commit
dfdf060d81
1 file changed
+2
@@ -1158,6 +1158,8 @@ async def document_save_handler(document_id, data, user):
|
||||
page = document_page(note.data, document_id)
|
||||
if not isinstance(data.get('content'), dict):
|
||||
return None
|
||||
if data['content'] == page['content']:
|
||||
return note
|
||||
editor = await Users.get_user_by_id(user['id'])
|
||||
if not editor or not await has_access_to_note_files(note, get_content_files(data['content']), editor):
|
||||
raise ValueError('Cannot attach files you cannot access')
|
||||
|
||||
Reference in new issue
Block a user