Skip to content

Commit

Permalink
fix: return null for missing user and group fields in VFolder looku…
Browse files Browse the repository at this point in the history
…p API response (#2584)

Co-authored-by: Jeongseok Kang <[email protected]>
Co-authored-by: Kyujin Cho <[email protected]>
  • Loading branch information
3 people authored Aug 20, 2024
1 parent fa50269 commit 7c7d174
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/2584.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix `GET /func/folders/{folderName}` API returning string literal `"null"` instead of null value on `user` and `group` fields
4 changes: 2 additions & 2 deletions src/ai/backend/manager/api/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,8 @@ async def get_info(request: web.Request, row: VFolderRow) -> web.Response:
"created": str(row["created_at"]), # legacy
"created_at": str(row["created_at"]),
"last_used": str(row["created_at"]),
"user": str(row["user"]),
"group": str(row["group"]),
"user": str(row["user"]) if row["user"] else None,
"group": str(row["group"]) if row["group"] else None,
"type": "user" if row["user"] is not None else "group",
"is_owner": is_owner,
"permission": permission,
Expand Down

0 comments on commit 7c7d174

Please sign in to comment.