#10692: DecimalField raises "InvalidOperation: Rescale > prec"
---------------------------------------------------+------------------------
          Reporter:  krylatij                      |         Owner:  gwilson
            Status:  assigned                      |     Milestone:  1.1    
         Component:  Database layer (models, ORM)  |       Version:  SVN    
        Resolution:                                |      Keywords:         
             Stage:  Unreviewed                    |     Has_patch:  0      
        Needs_docs:  0                             |   Needs_tests:  0      
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by gwilson):

  * status:  new => assigned
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * owner:  nobody => gwilson
  * needs_docs:  => 0

Old description:

> Create simple model:
>
> class Test(models.Model):
>     area = models.DecimalField(default=0, max_digits=7, decimal_places=2)
>
> run:
> Test.objects.filter(area__lte=1000000000)
>
> it will raise InvalidOperation: Rescale > prec in decimal.py

New description:

 Create simple model:

 {{{
 class Test(models.Model):
     area = models.DecimalField(default=0, max_digits=7, decimal_places=2)
 }}}

 run:
 {{{
 Test.objects.filter(area__lte=1000000000)
 }}}

 it will raise `InvalidOperation: Rescale > prec` in decimal.py

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10692#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to