]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1796971 Wait for call number and copy before loading locations
authorDan Wells <dbw2@calvin.edu>
Thu, 11 Oct 2018 13:21:05 +0000 (09:21 -0400)
committerCesar Velez <cesardv@protonmail.ch>
Tue, 16 Oct 2018 22:30:10 +0000 (18:30 -0400)
commit39136e3cf7daad2e5805b5609ebddd8806c9362f
treea1e110b29079e1579d7c6fa014fdaa73223fcfe2
parentd9d9d766b1a772f749b1bcf4e9ebbadd929bc4d9
LP#1796971 Wait for call number and copy before loading locations

In cases where add a copy to a call number, we fetch the original
call number via async, then attach the new copy to it.  Before this
commit, however, we were not waiting for the call number fetch
promise to resolve, so the copy wasn't there to use for limiting the
location load.

Since the async request is internal to a loop, one way out is to
capture that promise, then make sure it resolves before loading the
locations.

(We previously returned the copies from the internal function, but that
value wasn't being used anyway, so we don't worry about unwrapping the
$q.all() when it resolves.)

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Conflicts:
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js