#32619: 'ManyToOneRel' object has no attribute 'get_limit_choices_to'
-------------------------------+--------------------------------------
     Reporter:  Seb G          |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  contrib.admin  |                  Version:  3.2
     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
-------------------------------+--------------------------------------

Comment (by Seb G):

 For some reason, in my base example, the `data-` attributes on the HTML
 `select` are as follow:

 - `data-app-label="myapp"`
 - `data-model-name="ticket"`
 - `data-field-name="user"`

 While in my real-life project they seem to be reversed as follow:

 - `data-app-label="users"`
 - `data-model-name="User"`
 - `data-field-name="ticket"`

 This causes a `ManyToOneRel` to be passed to
 `AutocompleteJsonView.get_queryset` instead of the expected `ForeignKey`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32619#comment:3>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.15e4824a6547b908d2ce6001829a7c86%40djangoproject.com.

Reply via email to