Skip to content

Limit parameter for "v2/submissions/protocol" return duplicate results #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zaxeer opened this issue Aug 24, 2020 · 1 comment
Open

Comments

@zaxeer
Copy link

zaxeer commented Aug 24, 2020

We have observed that when we use limit parameter we get different number of results in case of an Even Limit parameter e.g.; 2
For example:
https://api-test.interhyp.de/submission/v2/submissions/protocol?since=2020-04-06T00:00:00Z&embed=false&protocolType=document
Return in total 5 Submissions

But when we add limit parameter and go through next pages using after parameter we get total 6 results, where one result is duplicated.

Page 1
https://api-test.interhyp.de/submission/v2/submissions/protocol?since=2020-04-06T00:00:00Z&protocolType=document&limit=2

Page 2
https://api-test.interhyp.de/submission/v2/submissions/protocol?since=2020-04-06T00:00:00Z&protocolType=document&limit=2&after=1590125649271

Page 3
https://api-test.interhyp.de/submission/v2/submissions/protocol?since=2020-04-06T00:00:00Z&protocolType=document&limit=2&after=1593160682079

@mohamed-asfour
Copy link
Collaborator

Thank you zaxeer for posting this issue.

I was able to identify the problem as following:

  • in total there are 6 Documents Protocol items older than the provided since param '2020-04-06' belonging to 5 different Submissions
  • submission 'de-0000f50-b13mlanlg' has 2 Protocol Items for Type 'Document' with different timestamps. (can be spotted when setting embed param to true)
  • therefore setting limit to less than protocol items count (6 in your case), might result in showing duplicate Submissions entries depending on the position of the protocol item in the page.

We will fix this issue and update the status here.

Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants