From fd97b0471b19cb45c4346e4947dfa7e69ff06158 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Wed, 7 Jun 2023 12:13:34 +0100 Subject: Allowed multiplication of lazy() objects with int return type. --- django/utils/functional.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/utils') diff --git a/django/utils/functional.py b/django/utils/functional.py index b78706e073..0bc641cb21 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -163,6 +163,9 @@ def lazy(func, *resultclasses): def __mod__(self, other): return self.__cast() % other + def __mul__(self, other): + return self.__cast() * other + # Add wrappers for all methods from resultclasses which haven't been # wrapped explicitly above. for resultclass in resultclasses: -- cgit v1.3