diff options
| author | Ran Benita <ran234@gmail.com> | 2019-05-03 13:46:21 +0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-05-22 20:41:52 +0200 |
| commit | a2c31e12da272acc76f3a3a0157fae9a7f6477ac (patch) | |
| tree | c3a3ad2f35b0b0a37429f9953b3c8df9a5fb70ca /django/utils/functional.py | |
| parent | b711eafd2aabdf22e1d529bfb76dd8d3356d7000 (diff) | |
Fixed #30498 -- Fixed proxy class caching in lazy().
lazy() should prepare the proxy class only once (the first time it's
used) not on every call.
Regression in b4e76f30d12bfa8a53cc297c60055c6f4629cc4c.
Diffstat (limited to 'django/utils/functional.py')
| -rw-r--r-- | django/utils/functional.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py index ab0be502ce..1b81d414fa 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -79,7 +79,7 @@ def lazy(func, *resultclasses): self.__kw = kw if not self.__prepared: self.__prepare_class__() - self.__prepared = True + self.__class__.__prepared = True def __reduce__(self): return ( |
