mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-02 06:35:20 +00:00
refac
This commit is contained in:
parent
ca176c5c03
commit
88dbc14abc
3 changed files with 2 additions and 5 deletions
|
|
@ -806,7 +806,7 @@ class ChannelTable:
|
|||
|
||||
# Determine user groups
|
||||
user_group_ids = [
|
||||
group.id for group in Groups.get_groups_by_member_id(user_id)
|
||||
group.id for group in Groups.get_groups_by_member_id(user_id, db=db)
|
||||
]
|
||||
|
||||
# Apply ACL rules
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ class NoteTable:
|
|||
) -> list[NoteModel]:
|
||||
with get_db_context(db) as db:
|
||||
user_group_ids = [
|
||||
group.id for group in Groups.get_groups_by_member_id(user_id)
|
||||
group.id for group in Groups.get_groups_by_member_id(user_id, db=db)
|
||||
]
|
||||
|
||||
query = db.query(Note).order_by(Note.updated_at.desc())
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ from typing import Optional
|
|||
|
||||
from open_webui.models.memories import Memories, MemoryModel
|
||||
from open_webui.retrieval.vector.factory import VECTOR_DB_CLIENT
|
||||
from open_webui.utils.auth import get_verified_user
|
||||
|
||||
|
||||
from open_webui.utils.auth import get_verified_user
|
||||
from open_webui.internal.db import get_session
|
||||
from sqlalchemy.orm import Session
|
||||
|
|
|
|||
Loading…
Reference in a new issue