Opened 9 years ago
Closed 9 years ago
#26992 closed Bug (needsinfo)
On admin change view, exception raised from __unicode__ method of model related by fk is "hidden" and instead view without form shown
| Reported by: | okrutny | Owned by: | nobody | 
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.9 | 
| Severity: | Normal | Keywords: | change empty exception | 
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description (last modified by )
I have a model PolcardPayments which references Order by fk.
class PolcardPayments(models.Model):
    order = models.ForeignKey(Order, null=True)
Order.__unicode__
was not correctly implemented, raising UnicodeEncodeError.
When I entered change view of PolcardPayments as admin, form was not shown. I found in logs that UnicodeEncodeError is raised.
Expected behavour would be to raise 500 error and process same way as other such errors.
Attachments (1)
Change History (4)
by , 9 years ago
| Attachment: | empty_change_view.png added | 
|---|
comment:1 by , 9 years ago
| Description: | modified (diff) | 
|---|
comment:2 by , 9 years ago
I guess it might be the expected exception silencing of the {% include %} template tag. Could you try to do a little investigation to tell us exactly where the exception silencing is happening?
comment:3 by , 9 years ago
| Resolution: | → needsinfo | 
|---|---|
| Status: | new → closed | 
If that's not the issue, then please provide a more complete sample project that reproduces the issue and reopen the ticket. Thanks.
empty change view