Skip to content

Commit

Permalink
Replaced 'return' by 'raise' in custom model field docs
Browse files Browse the repository at this point in the history
Thanks Simon Charette for noticing it. Refs #11162.
  • Loading branch information
claudep committed Jul 2, 2012
1 parent 2cd4cf5 commit 784d0c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/howto/custom-model-fields.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ database, so we need to be able to process strings and ``Hand`` instances in


Notice that we always return a ``Hand`` instance from this method. That's the Notice that we always return a ``Hand`` instance from this method. That's the
Python object type we want to store in the model's attribute. If anything is Python object type we want to store in the model's attribute. If anything is
going wrong during value conversion, you should return a going wrong during value conversion, you should raise a
:exc:`~django.core.exceptions.ValidationError` exception. :exc:`~django.core.exceptions.ValidationError` exception.


**Remember:** If your custom field needs the :meth:`to_python` method to be **Remember:** If your custom field needs the :meth:`to_python` method to be
Expand Down

0 comments on commit 784d0c2

Please sign in to comment.