internetarchive / internetarchive/openlibrary
Works sometimes show up twice in a QueryCarousel that calls a subject tag
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
In the [LGBTQ collection](https://openlibrary.org/collections/LGBTQ), we're using QueryCarousels searching by subject. Sometimes a work will show up twice in the results. This has happened more than once in different, unrelated carousels.
### Evidence / Screenshot (if possible)

### Relevant url?
https://openlibrary.org/collections/LGBTQ
### Steps to Reproduce
1. Go to the [LGBTQ collection](https://openlibrary.org/collections/LGBTQ).
2. Wait 10+ seconds for the page to load. If this bothers you, please see #5728.
2. Scroll down to the [LGBTQ sociology carousel](https://openlibrary.org/collections/LGBTQ#lgbtq_sociology).
3. Click the right arrow to "load more" three times.
* Actual: The work Spirit in the Flesh shows up twice, but links to the same work id. It appears to be a total duplicate.
* Expected: The work Spirit in the Flesh should only show up once.
### Details
- **Logged in (Y/N)?** both
- **Browser type/version?** Firefox 91.0.2 for Mint
- **Operating system?** Linux Mint 20
- **Environment (prod/dev/local)?** prod, testing
### Proposal & Constraints
It's possible this was two works that were both given the LGBTQ sociology subject separately, then merged later? I'm not sure.
Is it possible to have the macro do a uniqueness check on work ids before returning the results?
### Related files
### Stakeholders
@libjenner
Contributor guide
Assessment
This issue has not been assessed yet.