diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index 5e3c7cab82512..cbf4fd8296ae0 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -533,6 +533,7 @@ def __hash__(self): Combinable.SUB, Combinable.MUL, Combinable.DIV, + Combinable.MOD, ) }, # Bitwise operators. diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index 39e6c18b1a126..d63415ae72330 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -2416,7 +2416,13 @@ def test_resolve_output_field_number(self): (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(