Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#10692 closed (fixed)

DecimalField raises "InvalidOperation: Rescale > prec"

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

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

Description: modified (diff)
Owner: changed from nobody to Gary Wilson
Status: newassigned

comment:2 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: assignedclosed

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

comment:4 by Malcolm Tredinnick, 16 years ago

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

Backport of r10545 from trunk.

comment:5 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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