mirror of
https://github.com/django/django.git
synced 2025-02-11 09:55:22 +00:00
Fix proxy objects to respect !=
This commit is contained in:
parent
38a8cf1cdc
commit
d58c98d73c
@ -147,6 +147,11 @@ def lazy(func, *resultclasses):
|
||||
else:
|
||||
return func(*self.__args, **self.__kw)
|
||||
|
||||
def __ne__(self, other):
|
||||
if isinstance(other, Promise):
|
||||
other = other.__cast()
|
||||
return self.__cast() != other
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, Promise):
|
||||
other = other.__cast()
|
||||
|
Loading…
x
Reference in New Issue
Block a user