diff options
| author | Theo Alexiou <theofilosalexiou@gmail.com> | 2022-02-05 20:28:09 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-10 11:24:51 +0100 |
| commit | f9ec777a826816e20e68021c0e73b5a76be650af (patch) | |
| tree | 5c1eba3d3fad3e32361d44a8c6fff1559a1c11b9 /django/utils/functional.py | |
| parent | 4c76ffc2d6c77c850b4bef8d9acc197d11c47937 (diff) | |
Fixed #26287 -- Added support for addition operations to SimpleLazyObject.
Diffstat (limited to 'django/utils/functional.py')
| -rw-r--r-- | django/utils/functional.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py index 9e1be0fe0f..2696dd49c5 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -432,6 +432,12 @@ class SimpleLazyObject(LazyObject): return result return copy.deepcopy(self._wrapped, memo) + __add__ = new_method_proxy(operator.add) + + @new_method_proxy + def __radd__(self, other): + return other + self + def partition(predicate, values): """ |
