mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 13:33:08 +00:00
[DS-2996] Fix retrieval of hierarchical of communities from a collection.
This commit is contained in:
@@ -232,11 +232,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
||||
List<Community> result = new ArrayList<>();
|
||||
List<Collection> collections = item.getCollections();
|
||||
for (Collection collection : collections) {
|
||||
List<Community> owningCommunities = collection.getCommunities();
|
||||
for (Community community : owningCommunities) {
|
||||
result.add(community);
|
||||
result.addAll(communityService.getAllParents(context, community));
|
||||
}
|
||||
result.addAll(communityService.getAllParents(context, collection));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user