mirror of
https://github.com/open-webui/computer.git
synced 2026-11-27 15:49:24 -05:00
refac
This commit is contained in:
1 parent
437df5d8b8
commit
ed4630c671
119 files changed
+8531
-2882
No files matched your search
@@ -19,6 +19,7 @@ def _uuid() -> str:
|
||||
|
||||
class Workspace(Base):
|
||||
"""Per-workspace state. One row per (user, filesystem path)."""
|
||||
|
||||
__tablename__ = "workspaces"
|
||||
|
||||
id = Column(Text, primary_key=True, default=_uuid)
|
||||
@@ -38,9 +39,7 @@ class Workspace(Base):
|
||||
"""List all workspaces for a user."""
|
||||
async with await get_db() as db:
|
||||
result = await db.execute(
|
||||
select(Workspace)
|
||||
.where(Workspace.user_id == user_id)
|
||||
.order_by(Workspace.created_at)
|
||||
select(Workspace).where(Workspace.user_id == user_id).order_by(Workspace.created_at)
|
||||
)
|
||||
return list(result.scalars().all())
|
||||
|
||||
|
||||
Reference in new issue
Block a user