mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac
This commit is contained in:
parent
79c005a041
commit
e3889522d6
1 changed files with 4 additions and 1 deletions
|
|
@ -112,7 +112,10 @@ class FilesTable:
|
||||||
with get_db() as db:
|
with get_db() as db:
|
||||||
return [
|
return [
|
||||||
FileModel.model_validate(file)
|
FileModel.model_validate(file)
|
||||||
for file in db.query(File).filter(File.id.in_(ids)).all()
|
for file in db.query(File)
|
||||||
|
.filter(File.id.in_(ids))
|
||||||
|
.order_by(File.updated_at.desc())
|
||||||
|
.all()
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_files_by_user_id(self, user_id: str) -> list[FileModel]:
|
def get_files_by_user_id(self, user_id: str) -> list[FileModel]:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue