#13085: GenericForeignKey.get_content_type fails if `object` or `id` evaluate to
False. Should use 'is not None' test.
--------------------------+-------------------------------------------------
Reporter: benreynwar | Owner: nobody
Status: new | Milestone:
Component: Contrib apps | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 1 |
--------------------------+-------------------------------------------------
{{{contenttypes.GenericForeignKey.get_content_type}}} is used to find the
content type of an object. If the object evaluates to False, then an
error is raised. This is because 'if obj:' is used, rather than 'if obj
is not None:'. The same problem exists for the 'id' argument, and I
believe also in the {{{__get__}}} method.
--
Ticket URL: <http://code.djangoproject.com/ticket/13085>
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.