{"action":"created","issue":{"url":"https://api.github.com/repos/alex/django-filter/issues/217","labels_url":"https://api.github.com/repos/alex/django-filter/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/alex/django-filter/issues/217/comments","events_url":"https://api.github.com/repos/alex/django-filter/issues/217/events","html_url":"https://github.com/alex/django-filter/pull/217","id":60359791,"number":217,"title":"Provide a means of avoiding distinct() on MultipleChoiceFilter","user":{"login":"JonPeel","id":2270418,"avatar_url":"https://avatars.githubusercontent.com/u/2270418?v=3","gravatar_id":"","url":"https://api.github.com/users/JonPeel","html_url":"https://github.com/JonPeel","followers_url":"https://api.github.com/users/JonPeel/followers","following_url":"https://api.github.com/users/JonPeel/following{/other_user}","gists_url":"https://api.github.com/users/JonPeel/gists{/gist_id}","starred_url":"https://api.github.com/users/JonPeel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonPeel/subscriptions","organizations_url":"https://api.github.com/users/JonPeel/orgs","repos_url":"https://api.github.com/users/JonPeel/repos","events_url":"https://api.github.com/users/JonPeel/events{/privacy}","received_events_url":"https://api.github.com/users/JonPeel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-09T15:24:56Z","updated_at":"2015-08-12T19:16:24Z","closed_at":"2015-08-12T19:16:24Z","pull_request":{"url":"https://api.github.com/repos/alex/django-filter/pulls/217","html_url":"https://github.com/alex/django-filter/pull/217","diff_url":"https://github.com/alex/django-filter/pull/217.diff","patch_url":"https://github.com/alex/django-filter/pull/217.patch"},"body":"When using the MultipleChoiceFilter (or anything derived from it) we were having issues with the performance of queries whenever they included a superfluous distinct() call (not at all needed in our case, the filter doesn't add duplication).  Seems this is easily avoided in the base Filter class but not in the MultipleChoiceFilter.  Changed: Adding the same self.distinct check as seen in Filter and defaulting to 'distinct=True' on the MultipleChoiceFilter for backward compatibility sake.\r\n\r\nGenerally a bit bemused by the `distinct` tangle we have here;  deferring all logic on whether distinct() is needed would surely sits better with whatever is responsible for running the final query?"},"comment":{"url":"https://api.github.com/repos/alex/django-filter/issues/comments/130416259","html_url":"https://github.com/alex/django-filter/pull/217#issuecomment-130416259","issue_url":"https://api.github.com/repos/alex/django-filter/issues/217","id":130416259,"user":{"login":"carltongibson","id":64686,"avatar_url":"https://avatars.githubusercontent.com/u/64686?v=3","gravatar_id":"","url":"https://api.github.com/users/carltongibson","html_url":"https://github.com/carltongibson","followers_url":"https://api.github.com/users/carltongibson/followers","following_url":"https://api.github.com/users/carltongibson/following{/other_user}","gists_url":"https://api.github.com/users/carltongibson/gists{/gist_id}","starred_url":"https://api.github.com/users/carltongibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carltongibson/subscriptions","organizations_url":"https://api.github.com/users/carltongibson/orgs","repos_url":"https://api.github.com/users/carltongibson/repos","events_url":"https://api.github.com/users/carltongibson/events{/privacy}","received_events_url":"https://api.github.com/users/carltongibson/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T19:16:24Z","updated_at":"2015-08-12T19:16:24Z","body":"I'm closing this in favour of #278 — that just brings this up to the latest develop. (Having not got to it sooner I felt bad asking you to update.)\r\n\r\nThanks for the work here @JonPeel! Awesome!"}}