Django

Code

Ticket #753 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

ValidationError & CriticalValidationError raise assertion errors since translation update

Reported by: django@kieranholland.com Assigned to: hugo
Milestone: Component: Validators
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

11/20/05 20:58:30 changed by django@kieranholland.com

  • status changed from new to closed.
  • resolution set to fixed.

Somewhere along the way this one got fixed.

11/20/05 21:28:52 changed by django@kieranholland.com

  • status changed from closed to reopened.
  • resolution deleted.

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

11/21/05 02:51:29 changed by hugo

  • owner changed from adrian to hugo.
  • status changed from reopened to new.

11/21/05 02:51:33 changed by hugo

  • status changed from new to assigned.

11/21/05 04:41:56 changed by hugo

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #753 (ValidationError & CriticalValidationError raise assertion errors since translation update)




Change Properties
Action