web/admin: fix error when creating new users
Signed-off-by: Jens Langhammer <jens@goauthentik.io> #4685
This commit is contained in:
parent
7d6b573f8b
commit
dfb9ae548c
|
@ -51,7 +51,7 @@ export class GroupForm extends ModelForm<Group, string> {
|
|||
patchedGroupRequest: data,
|
||||
});
|
||||
} else {
|
||||
data.users = Array.from(this.instance?.users || []);
|
||||
data.users = [];
|
||||
return new CoreApi(DEFAULT_CONFIG).coreGroupsCreate({
|
||||
groupRequest: data,
|
||||
});
|
||||
|
|
|
@ -48,6 +48,7 @@ export class UserForm extends ModelForm<User, number> {
|
|||
patchedUserRequest: data,
|
||||
});
|
||||
} else {
|
||||
data.groups = [];
|
||||
return new CoreApi(DEFAULT_CONFIG).coreUsersCreate({
|
||||
userRequest: data,
|
||||
});
|
||||
|
|
Reference in a new issue