Fixed #30232 -- Corrected expected format in invalid DurationField error message.
This commit is contained in:
parent
17455e924e
commit
9681e968eb
|
@ -1587,7 +1587,7 @@ class DurationField(Field):
|
|||
empty_strings_allowed = False
|
||||
default_error_messages = {
|
||||
'invalid': _("'%(value)s' value has an invalid format. It must be in "
|
||||
"[DD] [HH:[MM:]]ss[.uuuuuu] format.")
|
||||
"[DD] [[HH:]MM:]ss[.uuuuuu] format.")
|
||||
}
|
||||
description = _("Duration")
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class TestValidation(SimpleTestCase):
|
|||
self.assertEqual(
|
||||
cm.exception.message % cm.exception.params,
|
||||
"'not a datetime' value has an invalid format. "
|
||||
"It must be in [DD] [HH:[MM:]]ss[.uuuuuu] format."
|
||||
"It must be in [DD] [[HH:]MM:]ss[.uuuuuu] format."
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue