From fc4124e39cf8b1c43f3f117984928ba2938e63d8 Mon Sep 17 00:00:00 2001 From: likeon Date: Wed, 22 Jul 2015 11:15:12 +0300 Subject: [PATCH] Fixes Job.__eq__ crash when other object doesn't have id attribute --- rq/job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/job.py b/rq/job.py index 1828fe2..fa85b9d 100644 --- a/rq/job.py +++ b/rq/job.py @@ -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)