From 8dc20cbb9f32e144bf2e550f26121d0dc67a98f0 Mon Sep 17 00:00:00 2001 From: Ivo Almeida Date: Mon, 23 Oct 2023 12:02:47 +0100 Subject: [PATCH] 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) --- .../dashboard/frontend/src/app/shared/forms/cd-form-group.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 64820d82a4122..09aac7136c46a 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) ); } -- 2.39.5