Changes between Initial Version and Version 1 of Ticket #19114
- Timestamp:
- Oct 12, 2012, 2:27:52 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19114
- Property Easy pickings set
- Property Has patch unset
- Property Triage Stage Unreviewed → Accepted
-
Ticket #19114 – Description
initial v1 1 the admin LogEntry function __unicode__()returns a proxy object for lazzy translation string in the case the self.action_flag is different from 1 2 or 3.1 the admin `LogEntry` function `__unicode__()` returns a proxy object for lazzy translation string in the case the self.action_flag is different from 1 2 or 3. 2 2 3 This leads to an exception in the admin when trying to delete such LogEntryor an associated object of it, when the admin needs its name to be displayed in the "delete confirmation" page.3 This leads to an exception in the admin when trying to delete such `LogEntry` or an associated object of it, when the admin needs its name to be displayed in the "delete confirmation" page. 4 4 5 5 the fix is to cast to unicode the returned value in line 46 of … … 12 12 13 13 14 it is because we are using a custom action_flag of 4 in some of our LogEntry, that the bug popped up.15 You will notice that the 3 other cases in the __unicode__function are not problematic because they are printf and therefor a new unicode string is geenrated and returned, and the proxy is "gettext-ed" before.14 it is because we are using a custom action_flag of 4 in some of our `LogEntry`, that the bug popped up. 15 You will notice that the 3 other cases in the `__unicode__` function are not problematic because they are printf and therefor a new unicode string is geenrated and returned, and the proxy is "gettext-ed" before. 16 16 17 17 18 18 the exception was: 19 19 {{{ 20 20 File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 111, in get_response 21 21 response = callback(request, *callback_args, **callback_kwargs) … … 67 67 68 68 TypeError: coercing to Unicode: need string or buffer, __proxy__ found 69 }}}