From: Bill Erickson Date: Mon, 19 Apr 2021 16:44:01 +0000 (-0400) Subject: LP1904036 Grid flat data service/support X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0f86a4defe6f4b1ace87b499a993bca4fc5002f8;p=Evergreen.git LP1904036 Grid flat data service/support Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/core/format.service.ts b/Open-ILS/src/eg2/src/app/core/format.service.ts index b73209b2d7..b58f5516e6 100644 --- a/Open-ILS/src/eg2/src/app/core/format.service.ts +++ b/Open-ILS/src/eg2/src/app/core/format.service.ts @@ -107,7 +107,16 @@ export class FormatService { } } else { - return value + ''; + + // We have an object with no display selector + // Display its pkey instead to avoid showing [object Object] + + const pkey = this.idl.classes[params.idlClass].pkey; + if (pkey && typeof value[pkey] === 'function') { + return value[pkey](); + } + + return ''; } case 'org_unit':