Skip to content

Commit

Permalink
fix: Add missing status_history GQL field
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Dec 10, 2024
1 parent f6e3465 commit dc89f40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ai/backend/manager/models/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,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:
Expand Down Expand Up @@ -1432,6 +1434,7 @@ def _get_field(name: str) -> Any:
cloneable=row["cloneable"],
status=row["status"],
cur_size=row["cur_size"],
status_history=row["status_history"],
)

@classmethod
Expand All @@ -1457,6 +1460,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:
Expand Down Expand Up @@ -1519,6 +1523,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
Expand Down

0 comments on commit dc89f40

Please sign in to comment.