Opened 8 years ago

Closed 7 years ago

Last modified 5 years ago

#10692 closed (fixed)

DecimalField raises "InvalidOperation: Rescale > prec"

Reported by: krylatij Owned by: Gary Wilson
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 Gary Wilson)

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 8 years ago by Gary Wilson

Description: modified (diff)
Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to Gary Wilson
Patch needs improvement: unset
Status: newassigned

comment:2 Changed 8 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:3 Changed 7 years ago by Malcolm Tredinnick

Resolution: fixed
Status: assignedclosed

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

comment:4 Changed 7 years ago by Malcolm Tredinnick

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

Backport of r10545 from trunk.

comment:5 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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