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)
committerBill Erickson <berickxx@gmail.com>
Thu, 29 Sep 2022 15:14:20 +0000 (11:14 -0400)
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>
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);
         }