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=fa15da246465a908307d1807c1dbc819a2adfe20;p=working%2FEvergreen.git LP1904036 Grid flat data service/support Signed-off-by: Bill Erickson --- 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 9622bd0681..57797579bc 100644 --- a/Open-ILS/src/eg2/src/app/core/format.service.ts +++ b/Open-ILS/src/eg2/src/app/core/format.service.ts @@ -102,7 +102,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':