From c9de45ddda1117c41cd198dc1be5126543c91c7e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 3 Aug 2021 14:48:20 -0400 Subject: [PATCH] LP1936233 More aged circ handling Signed-off-by: Bill Erickson --- .../src/eg2/src/app/staff/share/circ/circ.service.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts b/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts index 4f730678bf..367397c1e2 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts @@ -1414,7 +1414,6 @@ export class CircService { circsPrevYear: 0 }; - return this.pcrud.search('circbyyr', {copy : item.id()}, null, {atomic : true}).toPromise() @@ -1456,15 +1455,16 @@ export class CircService { response.prevCircSummary = prevSummary.summary; - if (prevSummary.usr) { // aged circs have no 'usr'. - - return this.pcrud.retrieve('au', prevSummary.usr, - {flesh : 1, flesh_fields : {au : ['card']}}) - .toPromise().then(user => { - response.prevCircUser = user; - return response; - }); + if (!prevSummary.usr) { // aged circs have no 'usr'. + return response; } + + return this.pcrud.retrieve('au', prevSummary.usr, + {flesh : 1, flesh_fields : {au : ['card']}}) + .toPromise().then(user => { + response.prevCircUser = user; + return response; + }); }); }); }); -- 2.11.0