1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #33464 -- Resolved output_field for combined numeric expressions with MOD operator.

This commit is contained in:
David Wobrock 2022-09-27 20:41:10 +02:00 committed by GitHub
parent bf47c71971
commit cff1f888e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -533,6 +533,7 @@ _connector_combinations = [
Combinable.SUB,
Combinable.MUL,
Combinable.DIV,
Combinable.MOD,
)
},
# Bitwise operators.

View File

@ -2416,7 +2416,13 @@ class CombinedExpressionTests(SimpleTestCase):
(IntegerField, FloatField, FloatField),
(FloatField, IntegerField, FloatField),
]
connectors = [Combinable.ADD, Combinable.SUB, Combinable.MUL, Combinable.DIV]
connectors = [
Combinable.ADD,
Combinable.SUB,
Combinable.MUL,
Combinable.DIV,
Combinable.MOD,
]
for lhs, rhs, combined in tests:
for connector in connectors:
with self.subTest(