From: Galen Charlton Date: Tue, 1 Sep 2020 15:33:45 +0000 (-0400) Subject: fm-edit: be more resilient in case linked values cannot be fleshed X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5bb0b5f67d58ec17c989c9eafbe6dfe2fe69b71a;p=working%2FEvergreen.git fm-edit: be more resilient in case linked values cannot be fleshed (as might happen in various permissions scenarios; for example, a user may be able to fetch providers but not the EDI default account associated with it) Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html index e20c037006..431dc287cc 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html @@ -51,7 +51,7 @@ - + {{field.linkedValues[0].label}} diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts index 8dfa4e08dd..7ea7c94f58 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts @@ -420,7 +420,8 @@ export class FmRecordEditorComponent || this.idl.getClassSelector(class_) || idField; return list.map(item => { - return {id: item[idField](), label: item[selector]()}; + if (item !== undefined) + return {id: item[idField](), label: item[selector]()}; }); }