From e492b5c5d3c6ac25cd7c30c53256e01454632687 Mon Sep 17 00:00:00 2001 From: Gyubong Lee Date: Sun, 8 Dec 2024 06:45:24 +0000 Subject: [PATCH] fix: Add missing `status_history` GQL field --- src/ai/backend/manager/models/vfolder.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ai/backend/manager/models/vfolder.py b/src/ai/backend/manager/models/vfolder.py index 364ece036f..b3bf88b137 100644 --- a/src/ai/backend/manager/models/vfolder.py +++ b/src/ai/backend/manager/models/vfolder.py @@ -1384,6 +1384,8 @@ class Meta: cloneable = graphene.Boolean() status = graphene.String() + status_history = graphene.JSONString(description="Added in 24.12.0.") + @classmethod def from_row(cls, ctx: GraphQueryContext, row: Row | VFolderRow) -> Optional[VirtualFolder]: if row is None: @@ -1418,6 +1420,7 @@ def _get_field(name: str) -> Any: cloneable=row["cloneable"], status=row["status"], cur_size=row["cur_size"], + status_history=row["status_history"], ) @classmethod @@ -1443,6 +1446,7 @@ def from_orm_row(cls, row: VFolderRow) -> VirtualFolder: cloneable=row.cloneable, status=row.status, cur_size=row.cur_size, + status_history=row.status_history, ) async def resolve_num_files(self, info: graphene.ResolveInfo) -> int: @@ -1505,6 +1509,7 @@ async def resolve_num_files(self, info: graphene.ResolveInfo) -> int: "cloneable": ("vfolders_cloneable", None), "status": ("vfolders_status", None), "cur_size": ("vfolders_cur_size", None), + "status_history": ("vfolders_status_history", None), } @classmethod