#13085: GenericForeignKey.get_content_type fails if `object` or `id` evaluate to
False. Should use 'is not None' test.
-----------------------------------+----------------------------------------
Reporter: benreynwar | Owner: benreynwar
Status: new | Milestone:
Component: Contrib apps | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-----------------------------------+----------------------------------------
Changes (by benreynwar):
* needs_tests: 1 => 0
Comment:
I've included a new patch with a regression test included. The object
will be false if it has __nonzero__ is defined and returns False, or if
__len__ is defined and returns 0. Either of these should be possible
without generic objects failing. The bug would also cause problems if a
generic object was used with content_type_id=0.
--
Ticket URL: <http://code.djangoproject.com/ticket/13085#comment:3>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.