LP#1942220: eg-item-location-select: fix use of contextOrgId
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 8 Dec 2021 15:42:20 +0000 (10:42 -0500)
committerJane Sandberg <js7389@princeton.edu>
Sun, 2 Oct 2022 15:02:50 +0000 (08:02 -0700)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Ruth Frasur <rfrasur@library.in.gov>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts

index 33edf71..e4836fd 100644 (file)
@@ -285,7 +285,9 @@ export class ItemLocationSelectComponent
         }
 
         const orgsFromCache = this.loc.filterOrgsCache[this.permFilter];
-        if (orgsFromCache) {
+        if (orgsFromCache && !this._contextOrgId) {
+            // if we're using contextOrgId, it may well change, so
+            // don't use the cache
             return Promise.resolve(this.filterOrgs = orgsFromCache);
         }