﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5355	"DecimalField may ""clean"" itself and then raise an Exception"	Weipin Xia <webbing@…>	Philippe Raoult	"DecimalField may ""clean"" itself and then raise an Exception. In my case, it happens when I put a DecimalField in a django.newforms.Form class which will be used to ""Edit"" the model.

I suppose it would be necessary to check the type of parameter '''value''' like some of the other ""Field"" classes, such as DateField.

{{{
         super(DecimalField, self).clean(value)
         if not self.required and value in EMPTY_VALUES:
             return None
         value = value.strip() # raise AttributeError, 'Decimal' object has no attribute 'strip'
         try:
             value = Decimal(value)
}}}


"		closed	Forms	dev		fixed	newforms, sprintsept14		Ready for checkin	1	0	0	0	0	0
