mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
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 b4e76f30d1.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b711eafd2a
commit
a2c31e12da
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user