toastdriven/django-tastypie — pull request #862 by kennknowles (2013-03-13 23:35:09+00:00)
Title: In DecimalField.hydrate, catch decimal.InvalidOperation and raise ApiFieldError

Current behavior when invalid data is submitted to `DecimalField.hydrate` is to let the `InvalidOperation` error escape to the top level, resulting in a 500 error. This patch adds tests to ensure that this does not happen and, analogously to invalid date formats, raises an `ApiFieldError`.