From f4b58764ae3f6b3c6bbedeee624de95bbc5b397f 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 4d4cb60007..3e7622c8b4 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 @@ -394,6 +394,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