Comment (by anonymous):
[http://www.replicawatchesbuy.org.uk/ replica watches] races
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:21>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: charette.s@… (added)
* owner: nobody => gcc
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:23>
* needs_better_patch: 1 => 0
* type: New feature => Bug
Comment:
Created a patch and test in a [https://github.com/django/django/pull/1169
pull request].
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:24>
* needs_docs: 1 => 0
* needs_better_patch: 0 => 1
Comment:
I don't think the overhead of applying `distinct` in cases where it's not
needed is ideal. We should either add logic so that it's not called when
it's not needed (as suggested by Malcolm above), or implement a solution
that will solve this by allowing a custom queryset to be used for choices
(e.g. #13181 or #2445).
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:25>
* cc: someuniquename@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:26>
Comment (by Josh):
Can we add an optional keyword argument to conditionally apply the
DISTINCT select? This just bit me on a production app.
Maybe something like:
{{{
account_manager = models.ForeignKey(
User,
limit_choices_to=Q(groups__name='Sales') | Q(groups__name='Admin'),
limit_choices_distinct=True, # default False
)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:27>
* owner: Chris Wilson => Crowley Shaita
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
Comment:
[https://github.com/django/django/pull/13315 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:28>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"556fa4bbba5ba86bc1646a86fb11ab55405d4aa4" 556fa4bb]:
{{{
#!CommitTicketReference repository=""
revision="556fa4bbba5ba86bc1646a86fb11ab55405d4aa4"
Fixed #1891, Fixed #11707 -- Prevented duplicates with limit_choices_to on
multi-value relations.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/1891#comment:29>