From 32717a4b1cf39514d98d46fee1a4ef66c199eb0b Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 14 May 2021 17:05:51 -0400 Subject: [PATCH] LP#1927527: (follow-up) add comment Just in case there's a question in the future, make it clear that the case where the context OU is the root OU is special. Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts index 64ff132d94..136e27a71b 100644 --- a/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts +++ b/Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts @@ -416,6 +416,10 @@ export class CatalogService { fetchCopyLocations(contextOrg: number | IdlObject): Promise { const contextOrgId: any = this.org.get(contextOrg).id(); + // we ordinarily want the shelving locations associated with + // all ancestors and descendants of the context OU, but + // if the context OU is the root, we intentionally want + // only the ones owned by the root OU const orgIds: any[] = contextOrgId === this.org.root().id() ? [contextOrgId] : this.org.fullPath(contextOrg, true); -- 2.11.0