From: Ivo Almeida Date: Mon, 23 Oct 2023 11:02:47 +0000 (+0100) Subject: mgr/dashboard: fixed edit user quota form error X-Git-Tag: v18.2.1~63^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8dc20cbb9f32e144bf2e550f26121d0dc67a98f0;p=ceph.git mgr/dashboard: fixed edit user quota form error Fixes: https://tracker.ceph.com/issues/63287 Signed-off-by: Ivo Almeida (cherry picked from commit 1a281ccd71bb00606e4d317d46b0144e673f53a9) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-group.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-group.ts index 64820d82a412..09aac7136c46 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-group.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-group.ts @@ -68,7 +68,7 @@ export class CdFormGroup extends UntypedFormGroup { showError(controlName: string, form: NgForm, errorName?: string): boolean { const control = this.get(controlName); return ( - (form.submitted || control.dirty) && + (form?.submitted || control.dirty) && (errorName ? control.hasError(errorName) : control.invalid) ); }