diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 1e156986f1..387277c5e9 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -1279,7 +1279,8 @@ class InventoryUpdate(UnifiedJob, InventorySourceOptions, JobNotificationMixin): def cancel(self): res = super(InventoryUpdate, self).cancel() - map(lambda x: x.cancel(), Job.objects.filter(dependent_jobs__in=[self.id])) + if res: + map(lambda x: x.cancel(), Job.objects.filter(dependent_jobs__in=[self.id])) return res