diff --git a/changes/1787.fix.md b/changes/1787.fix.md new file mode 100644 index 0000000000..06ff6a0b25 --- /dev/null +++ b/changes/1787.fix.md @@ -0,0 +1 @@ +Fix `modify_user` mutation not working diff --git a/src/ai/backend/manager/models/user.py b/src/ai/backend/manager/models/user.py index 46f316fb71..59e53c6e54 100644 --- a/src/ai/backend/manager/models/user.py +++ b/src/ai/backend/manager/models/user.py @@ -716,6 +716,8 @@ async def mutate( set_if_set(props, data, "resource_policy") set_if_set(props, data, "sudo_session_enabled") set_if_set(props, data, "main_access_key") + if data.get("password") is None: + data.pop("password", None) if not data and not props.group_ids: return cls(ok=False, msg="nothing to update", user=None) if data.get("status") is None and props.is_active is not None: