Steps
- Create a folder
- Put a large number of items in the folder (I reproduced this using 99 items, but it could show up as low 20)
- Request a node list of the folder through the api, for example:
- View each page
Expected
All files in the folder are on a page.
Actual
The last file on the first page is repeated on the second and third pages, and displaces the files that should be there.
This happens to:
The output_data/analysis_ready_metadata folder in the compedium I'm working with:
The THINGS-data model folder:
And the testing folder I created (This one is convenient because it's clear that test_11.txt and test_21.txt are replaced by test_1.txt on the second and third pages.)
Potential causes
My guess is that the bug involves sorting the nodes, perhaps in pagination.py. I notice that ordering within JSONAPIPagination is only enforced when the resource is embedded, while in SearchPagination ordering is always enforced. Perhaps moving the ordering to outside the if statement in JSONAPIPagination paginate_queryset would fix the problem?
Steps
Expected
All files in the folder are on a page.
Actual
The last file on the first page is repeated on the second and third pages, and displaces the files that should be there.
This happens to:
The output_data/analysis_ready_metadata folder in the compedium I'm working with:
The THINGS-data model folder:
And the testing folder I created (This one is convenient because it's clear that test_11.txt and test_21.txt are replaced by test_1.txt on the second and third pages.)
Potential causes
My guess is that the bug involves sorting the nodes, perhaps in pagination.py. I notice that ordering within JSONAPIPagination is only enforced when the resource is embedded, while in SearchPagination ordering is always enforced. Perhaps moving the ordering to outside the if statement in JSONAPIPagination paginate_queryset would fix the problem?