#22268: values_list() on a ManyToManyField returns extra None's when iterated 
over.
-------------------------------------+-------------------------------------
     Reporter:  k_sze                |                    Owner:
         Type:  Bug                  |  anubhav9042
    Component:  Database layer       |                   Status:  assigned
  (models, ORM)                      |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  orm, values_list,    |             Triage Stage:  Accepted
  ManyToManyField                    |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by anubhav9042):

 > Although I have another idea in mind:
 > We just add `pk` to the query and then when final result is obtained we
 can club the dicts/tuples having same `pk` and remove `pk`.
 >
 > Thoughts??
 >
 > I am suggesting changes this way becoz I think that the query generated
 is correct.

 I tried to do this way, but clubbing those dics/tuples is not easy as they
 are not exactly dics/tuple rather QuerySets.
 Will keep trying and post back soon

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22268#comment:25>
Django <https://code.djangoproject.com/>
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/063.1b1e2f85d581a231fad885a02296ad35%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to