Add delete protection from certain objects

Certain objects can be sensitive to being deleted while jobs are
running, this protects those objects
This commit is contained in:
Matthew Jones
2016-07-14 12:22:33 -04:00
parent 102e56b623
commit 00e55e3813
2 changed files with 46 additions and 6 deletions

View File

@@ -39,6 +39,7 @@ __all__ = ['UnifiedJobTemplate', 'UnifiedJob']
logger = logging.getLogger('awx.main.models.unified_jobs')
CAN_CANCEL = ('new', 'pending', 'waiting', 'running')
ACTIVE_STATES = CAN_CANCEL
class UnifiedJobTemplate(PolymorphicModel, CommonModelNameNotUnique, NotificationFieldsModel):