mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
fix: compare folder names for uniqueness with lower() equality instead of a LIKE pattern (#28695)
This commit is contained in:
parent
e4694d6c3f
commit
1d1c14bd77
1 changed files with 3 additions and 1 deletions
|
|
@ -230,7 +230,9 @@ class FolderTable:
|
|||
async with get_async_db_context(db) as db:
|
||||
# Check if folder exists
|
||||
result = await db.execute(
|
||||
select(Folder).filter_by(parent_id=parent_id, user_id=user_id).filter(Folder.name.ilike(name))
|
||||
select(Folder)
|
||||
.filter_by(parent_id=parent_id, user_id=user_id)
|
||||
.filter(func.lower(Folder.name) == func.lower(name))
|
||||
)
|
||||
folder = result.scalars().first()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue