From: Galen Charlton Date: Wed, 8 Dec 2021 15:42:20 +0000 (-0500) Subject: LP#1942220: eg-item-location-select: fix use of contextOrgId X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=07f926c10d5c6fc32f9f19db912498de9e5c6f51;p=working%2FEvergreen.git LP#1942220: eg-item-location-select: fix use of contextOrgId Signed-off-by: Galen Charlton --- 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); }