﻿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
26189	DecimalFields with float values raise errors on calling full_clean	Leonard Kioi kinyanjui	nobody	"After assigning a value with decimal places to a decimal field in a model , calling the model's `full_clean` method raises a `ValidationError`:
{{{#!python
     ----> 1 transaction.full_clean()

/home/vagrant/.virtualenvs/cashbox/lib/python3.4/site-packages/django/db/models/base.py in full_clean(self, exclude, validate_unique)
   1134 
   1135         if errors:
-> 1136             raise ValidationError(errors)
   1137 
   1138     def clean_fields(self, exclude=None):

ValidationError: {'amount': ['Ensure that there are no more than 12 digits in total.']}
  }}}

Seems to be raised by the new Decimal validator. Decimal field's `to_python` method creates a Decimal instance that has many decimal places which ends up violating the `max_digits` setting on the Decimal field."	Bug	closed	Database layer (models, ORM)	1.9	Normal	invalid			Unreviewed	0	0	0	0	0	0
