mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
refac
This commit is contained in:
parent
5b50f3cd69
commit
47cd0770e4
1 changed files with 13 additions and 4 deletions
|
|
@ -116,10 +116,19 @@ class NoteTable:
|
|||
if not note:
|
||||
return None
|
||||
|
||||
note.title = form_data.title
|
||||
note.data = form_data.data
|
||||
note.meta = form_data.meta
|
||||
note.access_control = form_data.access_control
|
||||
form_data = form_data.model_dump(exclude_none=True)
|
||||
|
||||
if "title" in form_data:
|
||||
note.title = form_data["title"]
|
||||
|
||||
if "data" in form_data:
|
||||
note.data = form_data["data"]
|
||||
if "meta" in form_data:
|
||||
note.meta = form_data["meta"]
|
||||
|
||||
if "access_control" in form_data:
|
||||
note.access_control = form_data["access_control"]
|
||||
|
||||
note.updated_at = int(time.time_ns())
|
||||
|
||||
db.commit()
|
||||
|
|
|
|||
Loading…
Reference in a new issue