#24525: AssertionError at `Query.change_aliases`
-------------------------------------+-------------------------------------
     Reporter:  coolRR               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by coolRR):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> (Django version 1.7.7)
>
> I'm getting an assertion error on the first line of
> `Query.change_aliases`:
>
>         assert
> set(change_map.keys()).intersection(set(change_map.values())) == set()
>
> Problem is, I can't post more data, because the queryset has confidential
> client information :(
>
> I can post the value of `change_map`, with identifying details renamed:
>
>     {'T5': 'T10',
>      'T6': 'T11',
>      'T8': 'T13',
>      'my_app_follow': 'my_app_follow',
>      'my_app_stack__readers': 'T7',
>      'my_app_stack__writers': 'T9',
>      'my_app_user': 'T8'}
>
> This happened when doing `&` on two querysets, one of which having
> `.distinct()` applied on it, among other things.

New description:

 (Django version 1.7.7)

 I'm getting an assertion error on the first line of
 `Query.change_aliases`:

 {{{
         assert
 set(change_map.keys()).intersection(set(change_map.values())) == set()
 }}}

 Problem is, I can't post more data, because the queryset has confidential
 client information :(

 I can post the value of `change_map`, with identifying details renamed:

 {{{
     {'T5': 'T10',
      'T6': 'T11',
      'T8': 'T13',
      'my_app_follow': 'my_app_follow',
      'my_app_stack__readers': 'T7',
      'my_app_stack__writers': 'T9',
      'my_app_user': 'T8'}
 }}}

 This happened when doing `&` on two querysets, one of which having
 `.distinct()` applied on it, among other things.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/24525#comment:1>
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/064.2d9a54febb47fadc8e9ae8b3b8322298%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to