From: Bill Erickson Date: Fri, 21 Jan 2022 21:47:03 +0000 (-0500) Subject: LP1904036 Checkin data collection race condition fix (printing hold slips) X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=3dd3620eed04ea372a698a442df1c2f7b80e75dd LP1904036 Checkin data collection race condition fix (printing hold slips) Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- 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 636af45..0a66be4 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 @@ -797,7 +797,7 @@ export class CircService { (nonCatCirc ? nonCatCirc.patron() : null); if (circPatronId) { - console.debug('fleshCommonData() circ ', circPatronId); + console.debug('fleshCommonData() circ patron id', circPatronId); promise = promise.then(_ => { return this.fetchPatron(circPatronId) .then(usr => { @@ -827,10 +827,12 @@ export class CircService { if (this.copyLocationCache[copy.location()]) { copy.location(this.copyLocationCache[copy.location()]); } else { - promise = this.pcrud.retrieve('acpl', copy.location()).toPromise() - .then(loc => { - copy.location(loc); - this.copyLocationCache[loc.id()] = loc; + promise = promise.then(_ => { + return this.pcrud.retrieve('acpl', copy.location()) + .toPromise().then(loc => { + copy.location(loc); + this.copyLocationCache[loc.id()] = loc; + }); }); }