#31190: AttributeError: "GenericRelatedObjectManager" has hardcoded
'content_type_id'
-------------------------------------+-------------------------------------
               Reporter:  Eugene     |          Owner:  Eugene Hatsko
  Hatsko                             |
                   Type:  Bug        |         Status:  assigned
              Component:             |        Version:  3.0
  contrib.contenttypes               |       Keywords:
               Severity:  Normal     |  GenericRelatedObjectManager
           Triage Stage:             |      Has patch:  1
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 On generic foreign key definition like:


 {{{
 obj = GenericForeignKey('object_content_type', 'object_id')
 }}}


 and


 {{{
 some_instances = GenericRelation('some_app.SomeModel',
 object_id_field='object_id', content_type_field='object_content_type')

 }}}

 On trying to get all some_instances, we get the next error:


 {{{
 AttributeError: 'SomeModel' object has no attribute 'content_type_id'
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31190>
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/051.578ba15d63fcef22af7fca54ba0ce878%40djangoproject.com.

Reply via email to