clean_<fieldname>() docs don't tell you what to do once you've verified the data is valid.
|Reported by:||mueen@…||Owned by:||nobody|
|Severity:||Keywords:||custom validation cleaned|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The custom validation docs for clean_<fieldname>() should point out that once you're done validating the data, it should return the cleaned data. It's not obvious that the method should have a return value.
(Additionally, a minor suggestion - perhaps you should refer to it as clean_<fieldname>(self). The current text could be confused to imply that self need not be added as an argument).
Change History (4)
comment:1 Changed 7 years ago by programmerq
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 6 years ago by mtredinnick
- Resolution set to fixed
- Status changed from new to closed