#15661: LogEntry objects have no unicode method
-------------------------------------+-------------------------------------
Reporter: Keryn Knight | Owner: ShawnMilo
<keryn@…> | Status: closed
Type: New feature | Version: master
Component: contrib.admin | Resolution: fixed
Severity: Normal | Triage Stage: Ready for
Keywords: logentry unicode | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by anonymous):
* ui_ux: => 0
Comment:
I'm getting errors in production (django 1.4) (not local development
django 1.3) when I try to delete an AuthUser that has an associated
LogEntry. The preview screen that shows all the linked objects does not
appear. Instead I get
TypeError: coercing to Unicode: need string or buffer, __proxy__ found
I suspect it is because the unicode method added in this patch is
returning a proxy object and not a unicode string.
Here is the full stacktrace...
Traceback (most recent call last):
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/core/handlers/base.py",
line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/options.py",
line 366, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/utils/decorators.py",
line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/views/decorators/cache.py",
line 89, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/sites.py",
line 196, in inner
return view(request, *args, **kwargs)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/utils/decorators.py",
line 25, in _wrapper
return bound_func(*args, **kwargs)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/utils/decorators.py",
line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/utils/decorators.py",
line 21, in bound_func
return func(self, *args2, **kwargs2)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/options.py",
line 1153, in changelist_view
response = self.response_action(request,
queryset=cl.get_query_set(request))
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/options.py",
line 908, in response_action
response = func(self, request, queryset)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/actions.py",
line 35, in delete_selected
queryset, opts, request.user, modeladmin.admin_site, using)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/util.py",
line 132, in get_deleted_objects
to_delete = collector.nested(format_callback)
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/util.py",
line 186, in nested
roots.extend(self._nested(root, seen, format_callback))
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/util.py",
line 169, in _nested
children.extend(self._nested(child, seen, format_callback))
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/util.py",
line 171, in _nested
ret = [format_callback(obj)]
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/contrib/admin/util.py",
line 130, in format_callback
force_unicode(obj))
File
"/home/fieldagent/webapps/fieldagent_no_3/lib/python2.7/django/utils/encoding.py",
line 71, in force_unicode
s = unicode(s)
TypeError: coercing to Unicode: need string or buffer, __proxy__ found
--
Ticket URL: <https://code.djangoproject.com/ticket/15661#comment:13>
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 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.