Merge pull request #565 from likeon/jobs-equality-fix

Fixes Job.__eq__ crash when other object doesn't have id attribute
main
Selwin Ong 10 years ago
commit 193dc8609e

@ -569,7 +569,7 @@ class Job(object):
# Job equality
def __eq__(self, other): # noqa
return self.id == other.id
return isinstance(other, self.__class__) and self.id == other.id
def __hash__(self):
return hash(self.id)

Loading…
Cancel
Save