Use querysets from the class not from an instance #5783
When filtering using
When the user is authenticated, we call to
We don't see this in production because we serve from another domain.
The text was updated successfully, but these errors were encountered:
When filtering using `public` and using a user, the queryset hit this https://github.com/rtfd/readthedocs.org/blob/45df7fd0da44be9eab3c0cb2888f6a9a15421fc5/readthedocs/builds/querysets.py#L22-L24 When the user is authenticated, we call to `get_objects_for_user` which gets all the versions from all the user's projects. Overriding any previous filter (`project.versions` in this case) We don't see this in production because we serve from another domain. And we don't see this in the corporate site because we override the serve_docs view. Fix readthedocs#4350 Closes readthedocs#4356
Steps to reproduce:
The problem is that when the user is authenticated,
We filter this before, but all versions get added later anyway, so that breaks the unique slug on the queryset.