diff options
Diffstat (limited to 'django/utils/functional.py')
| -rw-r--r-- | django/utils/functional.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py index 8dd8a8e006..5827389231 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -288,6 +288,9 @@ class LazyObject: self._wrapped = empty def __getattribute__(self, name): + if name == "_wrapped": + # Avoid recursion when getting wrapped object. + return super().__getattribute__(name) value = super().__getattribute__(name) # If attribute is a proxy method, raise an AttributeError to call # __getattr__() and use the wrapped object method. |
