Skip to content

Commit 959c79c

Browse files
author
Gabriel Monroy
committed
only apply jobs if defined
1 parent a09d60e commit 959c79c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

api/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ def destroy(self):
429429
# create subtasks to terminate all nodes in parallel
430430
subtasks.extend([ layer.destroy() for layer in self.layer_set.all() ])
431431
job = group(*subtasks)
432-
job.apply_async().join() # block for termination
432+
if job:
433+
job.apply_async().join() # block for termination
433434

434435

435436
@python_2_unicode_compatible

0 commit comments

Comments
 (0)