From: Bill Erickson Date: Tue, 3 Aug 2021 18:48:20 +0000 (-0400) Subject: LP1936233 More aged circ handling X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c9de45ddda1117c41cd198dc1be5126543c91c7e;p=working%2FEvergreen.git LP1936233 More aged circ handling Signed-off-by: Bill Erickson --- 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; + }); }); }); });