Skip to content

Commit

Permalink
Fix for DSpace#1602 Insufficient collection information when submitti…
Browse files Browse the repository at this point in the history
…ng an article
  • Loading branch information
im-shubham-vish committed Sep 13, 2024
1 parent 963b974 commit da206d4
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,25 @@ export class SidebarSearchListElementComponent<T extends SearchResult<K>, K exte
}),
);
}

getHierarchicalName(): Observable<string> {
return this.getParentTitle().pipe(
switchMap((parentTitle: string) => {
return this.getParent().pipe(
switchMap((parentRD: RemoteData<DSpaceObject>) => {
if (hasValue(parentRD) && hasValue(parentRD.payload)) {
const parentInstance = this.createInstanceFromDSpaceObject(parentRD.payload);
return parentInstance.getHierarchicalName().pipe(
map((ancestorName: string) => ancestorName ? `${ancestorName} > ${parentTitle}` : parentTitle)
);
}
return observableOf(parentTitle);
})
);
})
return this.getParent().pipe(
switchMap((parentRD: RemoteData<DSpaceObject>) => {
if (hasValue(parentRD) && hasValue(parentRD.payload)) {
const parentInstance = this.createInstanceFromDSpaceObject(parentRD.payload);
return parentInstance.getHierarchicalName().pipe(
map((ancestorName: string) => ancestorName ? `${ancestorName} > ${parentTitle}` : parentTitle),
);
}
return observableOf(parentTitle);
}),
);
}),
);
}

/**
* Utility method to create an instance of the current class from a DSpaceObject
*/
Expand Down

0 comments on commit da206d4

Please sign in to comment.