Though the clean_fields() method checks the start_date field and is executed before
the clean() method, the ValidationError is caught and the clean() method is
called anyway. Hence, the clean() method can be called even if there is no
start_date.
This prevents a crash in the clean() method even if there is no start_date.
Though the `clean_fields()` method checks the `start_date` field and is executed before
the `clean()` method, the `ValidationError` is caught and the `clean()` method is
called anyway. Hence, the `clean()` method can be called even if there is no
`start_date`.
This prevents a crash in the `clean()` method even if there is no `start_date`.
Though the
clean_fields()
method checks thestart_date
field and is executed before theclean()
method, theValidationError
is caught and theclean()
method is called anyway. Hence, theclean()
method can be called even if there is nostart_date
.This prevents a crash in the
clean()
method even if there is nostart_date
.https://code.ffdn.org/FFDN/coin/pulls/112/files#diff-96ec97a52954e15d0aa4aed2daece01e79a14e5R10 please share previous datetime module import line.
Updated to use
date.today()
.Thanks.
That was not exactly my point, but that looks perfectly fine also :-)