Leaklens

django__django-11049

Correct expected format in invalid DurationField error message

Verdict: the fix is stated in the issue (Tier A).

The current error message for invalid DurationField says that this should be the format of durations: "[DD] [HH:[MM:]]ss[.uuuuuu]". But according to the actual behaviour, it should be: "[DD] [[HH:]MM:]ss[.uuuuuu]", because seconds are mandatory, minutes are optional, and hours are optional if minutes are provided.

The text states the fix: “The current error message for invalid DurationField says that this should be the format of durations: "[DD] [HH:[MM:]]ss[.uuuuuu]". But according to the actual behaviour…”

All SWE-bench Lite tasks · more django/django tasks · How the check works