diff --git a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts index 1e58289c3a..0a19da54c8 100644 --- a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts @@ -24,6 +24,13 @@ export class AuthorizedCollectionSelectorComponent extends DSOSelectorComponent super(searchService); } + /** + * Get a query to send for retrieving the current DSO + */ + getCurrentDSOQuery(): string { + return this.currentDSOId; + } + /** * Perform a search for authorized collections with the current query and page * @param query Query to search objects for diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts index 931599c333..5bbcec4262 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -131,7 +131,7 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { // Create an observable searching for the current DSO (return empty list if there's no current DSO) let currentDSOResult$; if (isNotEmpty(this.currentDSOId)) { - currentDSOResult$ = this.search(`search.resourceid:${this.currentDSOId}`, 1); + currentDSOResult$ = this.search(this.getCurrentDSOQuery(), 1); } else { currentDSOResult$ = observableOf(new PaginatedList(undefined, [])); } @@ -175,6 +175,13 @@ export class DSOSelectorComponent implements OnInit, OnDestroy { })); } + /** + * Get a query to send for retrieving the current DSO + */ + getCurrentDSOQuery(): string { + return `search.resourceid:${this.currentDSOId}`; + } + /** * Perform a search for the current query and page * @param query Query to search objects for