Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10692 closed (fixed)

DecimalField raises "InvalidOperation: Rescale > prec"

Reported by: krylatij Owned by: gwilson
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by gwilson)

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

Change History (5)

comment:1 Changed 6 years ago by gwilson

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to gwilson
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 6 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [10545]) Fixed #10692 -- Fixed DecimalField lookups for extreme values.

comment:4 Changed 6 years ago by mtredinnick

(In [10546]) [1.0.X] Fixed #10692 -- Fixed DecimalField lookups for extreme values.

Backport of r10545 from trunk.

comment:5 Changed 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top