1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
django/tests/aggregation
Luke Plant 40b8a6174f Fixed #33397 -- Corrected resolving output_field for DateField/DateTimeField/TimeField/DurationFields.
This includes refactoring of CombinedExpression._resolve_output_field()
so it no longer uses the behavior inherited from Expression of guessing
same output type if argument types match, and instead we explicitly
define the output type of all supported operations.

This also makes nonsensical operations involving dates
(e.g. date + date) raise a FieldError, and adds support for
automatically inferring output_field for cases such as:
* date - date
* date + duration
* date - duration
* time + duration
* time - time
2022-03-31 11:05:23 +02:00
..
__init__.py
models.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_filter_argument.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
tests.py Fixed #33397 -- Corrected resolving output_field for DateField/DateTimeField/TimeField/DurationFields. 2022-03-31 11:05:23 +02:00