Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2015-05-06 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"d084176cc1273d5faf6f88eedb4c490e961f3a68" d084176c]:
 {{{
 #!CommitTicketReference repository=""
 revision="d084176cc1273d5faf6f88eedb4c490e961f3a68"
 Fixed #16609 -- Fixed duplicate admin results when searching nested M2M
 relations.

 This was fixed earlier but only when the M2M relation was at the first
 level on the object. This commit fixes the issue even when the M2M is
 at deeper levels, such as behind a foreign key.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.d0847d82d3de8a9240a088f397732975%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2015-04-21 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.d218575176105d9b519e9877703d4588%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2015-04-14 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * has_patch:  0 => 1


Comment:

 I wonder if we might mark this as a duplicate of #15819. The proposed
 patch there removes `lookup_needs_distinct()` instead of making it more
 complicated and looks like it would fix other issues.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.25b98f1eaa7b7094f72a3099a094%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2015-04-14 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by sampaccoud):

 I came across this bug which does not seem to be totally fixed yet? I
 tried to propose a fix and submitted a PR:
 https://github.com/django/django/pull/4504

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.bcf10935a34a3bd4691cc2d548f67534%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2015-04-14 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by sampaccoud):

 * status:  closed => new
 * resolution:  fixed =>


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.f6c7b328166b9e5966c8041863683852%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2013-09-21 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timo):

 * status:  new => closed
 * resolution:   => fixed


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.6e9c5ce5e002708d44f60484c173d4e6%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2013-09-21 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by CodenameTim):

 * cc: CodenameTim (added)


Comment:

 This bug has been fixed by at least 1.3.7 and it's fixed in master.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.ee43c1d2dc2aa916d76ad99241ea1281%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2013-04-22 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
 Reporter:  cheater00@…  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  search_fields m2m| Triage Stage:  Accepted
  duplicate duplicates   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by andreas@…):

 Has this bug been fixed in later versions of django? Still broken in 1.3.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2011-08-12 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
   Reporter: |  Owner:  nobody
  cheater00@…| Status:  new
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:  search_fields m2m
 Resolution: |  duplicate duplicates
   Triage Stage:  Accepted   |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-

Comment (by cheater ):

 For one thing, the admin actions also get doubled items. In fact, it is so
 that this could lead to fairly serious data loss and other errors. Imagine
 an admin action which bills users for something - they get found twice -
 and they get billed twice! I think this warrants bumping up the
 importance. I have also stumbled upon this when I was writing a money-
 related summary which counted the amount of items in stock, and summarized
 them, also calculating the prices. The prices were way off, of course. I
 have done a workaround wich skips objects that have already been seen by
 tracking the ID, but some other people might not be so lucky as to notice
 the problem before it's too late.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2011-08-11 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
   Reporter: |  Owner:  nobody
  cheater00@…| Status:  new
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:  search_fields m2m
 Resolution: |  duplicate duplicates
   Triage Stage:  Accepted   |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
Changes (by aaugustin):

 * stage:  Unreviewed => Accepted


Comment:

 It's likely that this is an ORM bug, but since the symptoms show in the
 admin, I'll leave it like this until we have more information.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2011-08-11 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
   Reporter: |  Owner:  nobody
  cheater00@…| Status:  new
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:  search_fields m2m
 Resolution: |  duplicate duplicates
   Triage Stage: |  Has patch:  0
  Unreviewed |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Description changed by aaugustin:

Old description:

> I believe this has already been touched upon in #15819, however the
> consensus (comment ticket:15819#comment:13) was
>
> "For people in situations where .distinct() is broken for whatever
> reason, the workaround here is simple: don't use search_fields with
> relations in a way that triggers it."
>
> I couldn't find a ticket for this, so here it is.
>
> In my case, I am searching for a keyword which is found in a
> search_fields item that isn't traversing M2M. When search_fields also
> contains a M2M traversal, I get duplicate results.
>
> In my case - this might be relevant or not - I am traversing a ForeignKey
> first and then an M2M field in that problematic search_fields entry, e.g:
>
> {{{
> search_fields = ['=id', '=fkmodel__m2mmodel__name']
> }}}
>
> This happens even though the string is not matched by
> fkmodel__m2mmodel__name, only by id.
>
> This might not be clear, this is what the model relations look like:
>
> {{{
> (Model SearchedModel) --ForeignKey--> (Model FKModel) --ManyToMany-->
> (Model M2MModel)
> }}}
>
> M2MModel contains the name field that I have specified in search_fields.
>
> This might or might not be related to #15559.
>
> I have tested this against 1.3, yesterday's 1.3.X, and yesterday's dev
> and it is broken in all of them. (today is 10 Aug 2011)

New description:

 I believe this has already been touched upon in #15819, however the
 consensus (comment ticket:15819#comment:13) was

 "For people in situations where `.distinct()` is broken for whatever
 reason, the workaround here is simple: don't use `search_fields` with
 relations in a way that triggers it."

 I couldn't find a ticket for this, so here it is.

 In my case, I am searching for a keyword which is found in a
 `search_fields` item that isn't traversing M2M. When `search_fields` also
 contains a M2M traversal, I get duplicate results.

 In my case - this might be relevant or not - I am traversing a !ForeignKey
 first and then an M2M field in that problematic search_fields entry, e.g:

 {{{
 search_fields = ['=id', '=fkmodel__m2mmodel__name']
 }}}

 This happens even though the string is not matched by
 `fkmodel__m2mmodel__name`, only by `id`.

 This might not be clear, this is what the model relations look like:

 {{{
 (Model SearchedModel) --ForeignKey--> (Model FKModel) --ManyToMany-->
 (Model M2MModel)
 }}}

 M2MModel contains the name field that I have specified in `search_fields`.

 This might or might not be related to #15559.

 I have tested this against 1.3, yesterday's 1.3.X, and yesterday's dev and
 it is broken in all of them. (today is 10 Aug 2011)

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2011-08-11 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
   Reporter: |  Owner:  nobody
  cheater00@…| Status:  new
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:  search_fields m2m
 Resolution: |  duplicate duplicates
   Triage Stage: |  Has patch:  0
  Unreviewed |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-

Old description:

> I believe this has already been touched upon in #15819, however the
> consensus (comment ticket:15819#comment:13) was
>
> "For people in situations where .distinct() is broken for whatever
> reason, the workaround here is simple: don't use search_fields with
> relations in a way that triggers it."
>
> I couldn't find a ticket for this, so here it is.
>
> In my case, I am searching for a keyword which is found in a
> search_fields item that isn't traversing M2M. When search_fields also
> contains a M2M traversal, I get duplicate results.
>
> In my case - this might be relevant or not - I am traversing a ForeignKey
> first and then an M2M field in that problematic search_fields entry, e.g:
>

> search_fields = ['=id', '=fkmodel__m2mmodel__name']
>
> This happens even though the string is not matched by
> fkmodel__m2mmodel__name, only by id.
>
> This might not be clear, this is what the model relations look like:
>
> (Model SearchedModel) --ForeignKey--> (Model FKModel) --ManyToMany-->
> (Model M2MModel)
>
> M2MModel contains the name field that I have specified in search_fields.
>

> This might or might not be related to #15559.
>
> I have tested this against 1.3, yesterday's 1.3.X, and yesterday's dev
> and it is broken in all of them. (today is 10 Aug 2011)

New description:

 I believe this has already been touched upon in #15819, however the
 consensus (comment ticket:15819#comment:13) was

 "For people in situations where .distinct() is broken for whatever reason,
 the workaround here is simple: don't use search_fields with relations in a
 way that triggers it."

 I couldn't find a ticket for this, so here it is.

 In my case, I am searching for a keyword which is found in a search_fields
 item that isn't traversing M2M. When search_fields also contains a M2M
 traversal, I get duplicate results.

 In my case - this might be relevant or not - I am traversing a ForeignKey
 first and then an M2M field in that problematic search_fields entry, e.g:

 {{{
 search_fields = ['=id', '=fkmodel__m2mmodel__name']
 }}}

 This happens even though the string is not matched by
 fkmodel__m2mmodel__name, only by id.

 This might not be clear, this is what the model relations look like:

 {{{
 (Model SearchedModel) --ForeignKey--> (Model FKModel) --ManyToMany-->
 (Model M2MModel)
 }}}

 M2MModel contains the name field that I have specified in search_fields.

 This might or might not be related to #15559.

 I have tested this against 1.3, yesterday's 1.3.X, and yesterday's dev and
 it is broken in all of them. (today is 10 Aug 2011)

--

Comment (by aaugustin):

 Fixed formatting.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2011-08-10 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
   Reporter: |  Owner:  nobody
  cheater00@…| Status:  new
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:  search_fields m2m
 Resolution: |  duplicate duplicates
   Triage Stage: |  Has patch:  0
  Unreviewed |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-

Comment (by cheater ):

 Sorry about not using code blocks above - only noticed the error after
 submitting the ticket. The search_fields should look like this:

 {{{
 search_fields = ['=id', '=fkmodel__m2mmodel__name']
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16609: Admin searches produce duplicate results if search_fields contains M2M traversals

2011-08-10 Thread Django
#16609: Admin searches produce duplicate results if search_fields contains M2M
traversals
-+-
   Reporter: |  Owner:  nobody
  cheater00@…| Status:  new
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:  search_fields m2m
 Resolution: |  duplicate duplicates
   Triage Stage: |  Has patch:  0
  Unreviewed |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by cheater ):

 * cc: cheater00@… (added)
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.