mirror of
https://github.com/django/django.git
synced 2025-09-18 08:20:10 +00:00
Fix != operations on lazy objects.
This commit is contained in:
parent
59d127e45f
commit
714161c864
2 changed files with 10 additions and 0 deletions
|
@ -346,6 +346,7 @@ class SimpleLazyObject(LazyObject):
|
|||
# care about this (especially in equality tests)
|
||||
__class__ = property(new_method_proxy(operator.attrgetter("__class__")))
|
||||
__eq__ = new_method_proxy(operator.eq)
|
||||
__ne__ = new_method_proxy(operator.ne)
|
||||
__hash__ = new_method_proxy(hash)
|
||||
__bool__ = new_method_proxy(bool) # Python 3
|
||||
__nonzero__ = __bool__ # Python 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue