Skip to content

Commit 5d1491c

Browse files
committed
Drop unnecessary check
1 parent 17eed07 commit 5d1491c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

rq/job.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,11 +1199,7 @@ def cancel(self, pipeline: Optional['Pipeline'] = None, enqueue_dependents: bool
11991199

12001200
# Go through all dependencies and remove the current job from each dependency's dependents_key
12011201
for dependency in self.fetch_dependencies(pipeline=pipe):
1202-
if not dependency:
1203-
continue
1204-
1205-
dependents_key = dependency.dependents_key
1206-
pipe.srem(dependents_key, self.id)
1202+
pipe.srem(dependency.dependents_key, self.id)
12071203

12081204
self._remove_from_registries(pipeline=pipe, remove_from_queue=True)
12091205

0 commit comments

Comments
 (0)