Opened 8 years ago

Last modified 8 years ago

#26992 closed Bug

On admin change view, exception raised from __unicode__ method of model related by fk is "hidden" and instead view without form shown — at Version 1

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 okrutny)

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.

Change History (2)

by okrutny, 8 years ago

Attachment: empty_change_view.png added

empty change view

comment:1 by okrutny, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top