﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23991	Oracle test failure on aggregation with max-digits	Shai Berger	Shai Berger	"On CI, reproduced locally:

{{{#!python
ERROR: test_decimal_max_digits_has_no_effect (aggregation.tests.BaseAggregateTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/django/django/tests/aggregation/tests.py"", line 702, in test_decimal_max_digits_has_no_effect
    book = Book.objects.aggregate(price_sum=Sum('price'))
  File ""/home/django/django/django/db/models/manager.py"", line 86, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File ""/home/django/django/django/db/models/query.py"", line 342, in aggregate
    return query.get_aggregation(self.db, kwargs.keys())
  File ""/home/django/django/django/db/models/sql/query.py"", line 422, in get_aggregation
    result = compiler.apply_converters(result, converters)
  File ""/home/django/django/django/db/models/sql/compiler.py"", line 696, in apply_converters
    value = converter(value, field)
  File ""/home/django/django/django/db/backends/oracle/base.py"", line 315, in convert_decimalfield_value
    return backend_utils.typecast_decimal(field.format_number(value))
  File ""/home/django/django/django/db/models/fields/__init__.py"", line 1556, in format_number
    return utils.format_number(value, self.max_digits, self.decimal_places)
  File ""/home/django/django/django/db/backends/utils.py"", line 201, in format_number
    value = value.quantize(decimal.Decimal("".1"") ** decimal_places, context=context)
  File ""/usr/lib/python2.7/decimal.py"", line 2470, in quantize
    'quantize result has too many digits for current context')
  File ""/usr/lib/python2.7/decimal.py"", line 3874, in _raise_error
    raise error(explanation)
InvalidOperation: quantize result has too many digits for current context

}}}

I suspect the commit  267a1dcd9b7877d97917ba6222fd247da060f9b0 which fixed #23941."	Bug	closed	Database layer (models, ORM)	dev	Release blocker	fixed	oracle		Unreviewed	0	0	0	0	0	0
