Prechádzať zdrojové kódy

New AsyncResult.__eq__ broke join_native

Ask Solem 13 rokov pred
rodič
commit
326ea1eca7
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      celery/result.py

+ 3 - 1
celery/result.py

@@ -202,7 +202,9 @@ class AsyncResult(ResultBase):
 
     def __eq__(self, other):
         if isinstance(other, AsyncResult):
-            return self.id == other.id
+            return other.id == self.id
+        elif isinstance(other, basestring):
+            return other == self.id
         return NotImplemented
 
     def __copy__(self):