Permalink
Browse files

Fix comparison with None

  • Loading branch information...
hoov committed Feb 5, 2014
1 parent 3c83d6d commit 374dda19186b6e88981ac5c5bc1f00bbc8d00cd2
Showing with 2 additions and 1 deletion.
  1. +2 −1 flywheel/models.py
@@ -479,7 +479,8 @@ def __hash__(self):
return hash(self.hk_) + hash(self.rk_)
def __eq__(self, other):
return (self.meta_.name == other.meta_.name and self.hk_ == other.hk_
return (isinstance(other, self.__class__)
and self.meta_.name == other.meta_.name and self.hk_ == other.hk_
and self.rk_ == other.rk_)
def __ne__(self, other):

0 comments on commit 374dda1

Please sign in to comment.