Skip to content

Commit 9b5ca7f

Browse files
committed
fix filter out Undefined values in user insert data
1 parent dde5182 commit 9b5ca7f

File tree

1 file changed

+3
-3
lines changed
  • src/ai/backend/manager/models

1 file changed

+3
-3
lines changed

src/ai/backend/manager/models/user.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,10 +664,10 @@ async def mutate(
664664
"totp_activated": props.totp_activated,
665665
"resource_policy": props.resource_policy,
666666
"sudo_session_enabled": props.sudo_session_enabled,
667-
"container_uid": props.container_uid,
668-
"container_main_gid": props.container_main_gid,
669-
"container_gids": props.container_gids,
670667
}
668+
set_if_set(props, user_data, "container_uid")
669+
set_if_set(props, user_data, "container_main_gid")
670+
set_if_set(props, user_data, "container_gids")
671671
user_insert_query = sa.insert(users).values(user_data)
672672

673673
async def _post_func(conn: SAConnection, result: Result) -> Row:

0 commit comments

Comments
 (0)