mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
fixed wrong pagination of collections
This commit is contained in:
@@ -177,7 +177,7 @@ public class CollectionRestRepository extends DSpaceObjectRestRepository<Collect
|
||||
}
|
||||
List<Collection> collections = cs.findCollectionsWithSubmit(q, context, com,
|
||||
Math.toIntExact(pageable.getOffset()),
|
||||
Math.toIntExact(pageable.getOffset() + pageable.getPageSize()));
|
||||
Math.toIntExact(pageable.getPageSize()));
|
||||
int tot = cs.countCollectionsWithSubmit(q, context, com);
|
||||
return converter.toRestPage(collections, pageable, tot , utils.obtainProjection());
|
||||
} catch (SQLException | SearchServiceException e) {
|
||||
@@ -192,7 +192,7 @@ public class CollectionRestRepository extends DSpaceObjectRestRepository<Collect
|
||||
Context context = obtainContext();
|
||||
List<Collection> collections = cs.findCollectionsWithSubmit(q, context, null,
|
||||
Math.toIntExact(pageable.getOffset()),
|
||||
Math.toIntExact(pageable.getOffset() + pageable.getPageSize()));
|
||||
Math.toIntExact(pageable.getPageSize()));
|
||||
int tot = cs.countCollectionsWithSubmit(q, context, null);
|
||||
return converter.toRestPage(collections, pageable, tot, utils.obtainProjection());
|
||||
} catch (SQLException e) {
|
||||
|
Reference in New Issue
Block a user