From fc80ad54f28fad59822d26c5f6c67bc7028aeb0e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 6 Jul 2020 11:03:21 -0400 Subject: [PATCH] LPXXX Angular Volcopy Signed-off-by: Bill Erickson --- .../src/eg2/src/app/staff/cat/volcopy/config.component.html | 6 +++--- .../src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/config.component.html b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/config.component.html index 8125e57a1d..031561a806 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/config.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/config.component.html @@ -141,15 +141,15 @@
  • - +
  • diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts index 1b2d109dd9..6bdda44263 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts @@ -336,11 +336,19 @@ export class CopyAttrsComponent implements OnInit, AfterViewInit { const entryId = this.statCatValues[catId]; + if (!entryId || !this.volcopy.statCatEntryMap[entryId]) { + console.warn( + `Attempt to apply stat cat value which does not exist. + This is likely the result of a stale copy template. + stat_cat=${catId} entry=${entryId}`); + + return; + } + this.context.copyList().forEach(copy => { let entry = copy.stat_cat_entries() .filter(e => e.stat_cat() === catId)[0]; - console.log('0', entry); if (entry) { if (entry.id() === entryId) { -- 2.11.0