Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix duplicate results returned by is_accessible
For some reason the queries are returning duplicates. It cannot be from the code that checks access through events, because even if the `accessible_projects_ids` has duplicates, the result returned should not have duplicates ``` >>> PublishedProject.objects.filter(id__in=[4,4,4]) <QuerySet [<PublishedProject: COVID-19 Epidemiology and Vaccination Dataset v1.0.0>]> ``` It looks like it might be because of union operation somehow. I am not sure what exactly, but i have hacky fix with .distinct() (Thanks to @ kshalot) On this commit, i added .distinct() to remove the duplicates so that method only returns unique projects/datasets
- Loading branch information