Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle empty list for pulp_href__in filter
Fix bug where empty list for the pulp_href__in filter returns all results instead of no results. The problem is that when using FilterMethod, django-filter just simply ignores None and empty set and returns the full list of results: https://github.com/carltongibson/django-filter/blob/e4a70a667a0bf3882fd44b557bc76583d2c65cd1/django_filters/filters.py#L804-L805 There's no way to update the method to prevent this since this logic happens before the method is called. Instead, this change moves the method to the filter and adds a None check. fixes pulp#4437
- Loading branch information