Code

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#753 closed defect (fixed)

ValidationError & CriticalValidationError raise assertion errors since translation update

Reported by: django@… Owned by: hugo
Component: Validators Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

ValidationError and CriticalValidationError apply the following assertion to error message text:

assert isinstance(message, basestring), ("%s should be a string" % repr(message))

This causes AssertionErrors for messages wrapped with gettext_lazy()

Attachments (0)

Change History (5)

comment:1 Changed 9 years ago by django@…

  • Resolution set to fixed
  • Status changed from new to closed

Somewhere along the way this one got fixed.

comment:2 Changed 9 years ago by django@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, I lie: This one is still a problem for the default validation error messages wrapped in gettext_lazy.

comment:3 Changed 9 years ago by hugo

  • Owner changed from adrian to hugo
  • Status changed from reopened to new

comment:4 Changed 9 years ago by hugo

  • Status changed from new to assigned

comment:5 Changed 9 years ago by hugo

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [1328]) fixes #753 - ValidationError and CriticalValidationError now accept both strings and promises from gettext_lazy

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.