From 07f926c10d5c6fc32f9f19db912498de9e5c6f51 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 8 Dec 2021 10:42:20 -0500 Subject: [PATCH] LP#1942220: eg-item-location-select: fix use of contextOrgId Signed-off-by: Galen Charlton --- .../share/item-location-select/item-location-select.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts b/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts index 8d9873c007..801501c32b 100644 --- a/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts @@ -267,7 +267,7 @@ export class ItemLocationSelectComponent } setFilterOrgs(): Promise { - const org = this.contextOrgId || this.auth.user().ws_ou(); + const org = this._contextOrgId || this.auth.user().ws_ou(); const contextOrgIds = this.org.ancestors(org, true); this.filterOrgsApplied = true; @@ -276,7 +276,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); } -- 2.11.0