mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55: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:
|
if not note:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
note.title = form_data.title
|
form_data = form_data.model_dump(exclude_none=True)
|
||||||
note.data = form_data.data
|
|
||||||
note.meta = form_data.meta
|
if "title" in form_data:
|
||||||
note.access_control = form_data.access_control
|
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())
|
note.updated_at = int(time.time_ns())
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue