mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Allow instant cancel for new jobs
This commit is contained in:
parent
53de76d6e0
commit
7e49a428e6
@ -873,7 +873,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
||||
if not self.cancel_flag:
|
||||
self.cancel_flag = True
|
||||
cancel_fields = ['cancel_flag']
|
||||
if self.status in ('pending', 'waiting'):
|
||||
if self.status in ('pending', 'waiting', 'new'):
|
||||
self.status = 'canceled'
|
||||
cancel_fields.append('status')
|
||||
self.save(update_fields=cancel_fields)
|
||||
|
Loading…
Reference in New Issue
Block a user