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:
parent
bf47c71971
commit
cff1f888e9
@ -533,6 +533,7 @@ _connector_combinations = [
|
||||
Combinable.SUB,
|
||||
Combinable.MUL,
|
||||
Combinable.DIV,
|
||||
Combinable.MOD,
|
||||
)
|
||||
},
|
||||
# Bitwise operators.
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user