Opened 10 years ago

Closed 10 years ago

Last modified 9 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()

Change History (5)

comment:1 Changed 10 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 10 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 10 years ago by hugo

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

comment:4 Changed 10 years ago by hugo

  • Status changed from new to assigned

comment:5 Changed 10 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

Note: See TracTickets for help on using tickets.
Back to Top