#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 )
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 , 17 years ago
| Description: | modified (diff) |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 17 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:4 by , 17 years ago
Note:
See TracTickets
for help on using tickets.
(In [10545]) Fixed #10692 -- Fixed DecimalField lookups for extreme values.