Permalink
Browse files

Fix proxy objects to respect !=

  • Loading branch information...
1 parent 38a8cf1 commit d58c98d73c41b97e9543f88d3a81ffa6f23e4c7d @andrewgodwin andrewgodwin committed May 19, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 django/utils/functional.py
@@ -147,6 +147,11 @@ def __cast(self):
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()

0 comments on commit d58c98d

Please sign in to comment.