mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 04:47:44 -02:30
fix a few bugs for scheduled jobs that run without inventories
see: https://github.com/ansible/ansible-tower/issues/7865 see: https://github.com/ansible/ansible-tower/issues/7866
This commit is contained in:
@@ -1119,6 +1119,8 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
||||
def can_schedule(self):
|
||||
if getattr(self, 'passwords_needed_to_start', None):
|
||||
return False
|
||||
if getattr(self, 'inventory', None) is None:
|
||||
return False
|
||||
JobLaunchConfig = self._meta.get_field('launch_config').related_model
|
||||
try:
|
||||
self.launch_config
|
||||
|
||||
Reference in New Issue
Block a user