rare bug with log deletion in admin
|Reported by:||sdfsdhgjkbmnmxc||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Admin interface. When we delete object with long unicode representation it may be wrong truncated: "object_repr[:200]" may intersect utf-8 pair bytes.
Next we have "'utf8' codec can't decode byte 0xd0 in position 199: unexpected end of data." error.
This is very rare bug, but today i have it.
Fix is one-line:
ModelAdmin.log_addition(), and ModelAdmin.log_change() has force_unicode inside:
object_repr = force_unicode(object),
but ModelAdmin.log_deletion() hasn't force_unicode inside:
object_repr = object_repr,
Change History (5)
comment:1 Changed 6 years ago by jacob
- milestone set to 1.1
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 6 years ago by jacob
- Resolution set to worksforme
- Status changed from new to closed