mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
fix user form non submission error
This commit is contained in:
parent
1accb9f939
commit
bc0511fe66
@ -9,6 +9,7 @@ function UserEdit({ user, history }) {
|
||||
const [formSubmitError, setFormSubmitError] = useState(null);
|
||||
|
||||
const handleSubmit = async values => {
|
||||
setFormSubmitError(null);
|
||||
try {
|
||||
await UsersAPI.update(user.id, values);
|
||||
history.push(`/users/${user.id}/details`);
|
||||
|
||||
@ -40,7 +40,7 @@ function UserFormFields({ user, i18n }) {
|
||||
|
||||
const organizationFieldArr = useField({
|
||||
name: 'organization',
|
||||
validate: required(i18n._(t`Select a value for this field`), i18n),
|
||||
validate: !user.id ? required(i18n._(t`Select a value for this field`), i18n) : () => undefined
|
||||
});
|
||||
const organizationMeta = organizationFieldArr[1];
|
||||
const organizationHelpers = organizationFieldArr[2];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user