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

 Problem solved. Cause was traced down to an evolution of the
 `BaseModelAdmin.formfield_for_foreignkey` method:

 {{{#!python
 if db_field.name in self.get_autocomplete_fields(request):
     kwargs['widget'] = AutocompleteSelect(db_field.remote_field,
 self.admin_site, using=db)
 }}}

 became

 {{{#!python
 if db_field.name in self.get_autocomplete_fields(request):
     kwargs['widget'] = AutocompleteSelect(db_field, self.admin_site,
 using=db)
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32619#comment:6>
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.403c930968b9c7392bbd2f7cb7b7254a%40djangoproject.com.

Reply via email to