#112 Do not crash if there is no start_date (fix #108)

Merged
jocelyn merged 1 commits from daimrod/fix-108-membershipfree-mandatory-date-fields into FFDN/master 8 years ago
daimrod commented 8 years ago

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`.
jocelyn commented 8 years ago
Owner
https://code.ffdn.org/FFDN/coin/pulls/112/files#diff-96ec97a52954e15d0aa4aed2daece01e79a14e5R10 please share previous datetime module import line.
daimrod commented 8 years ago
Collaborator

Updated to use date.today().

Thanks.

Updated to use `date.today()`. Thanks.
jocelyn commented 8 years ago
Owner

That was not exactly my point, but that looks perfectly fine also :-)

That was not exactly my point, but that looks perfectly fine also :-)
This pull request has been merged successfully!
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.