Merge pull request #3935 from jladdjr/at-3532-typo

Minor typo fix (pointing workflow node template at unsupported unified job template)
This commit is contained in:
Matthew Jones
2016-11-18 15:45:34 -05:00
committed by GitHub
12 changed files with 23 additions and 23 deletions
+4 -4
View File
@@ -353,17 +353,17 @@ class JobTemplate(UnifiedJobTemplate, JobOptions, SurveyJobTemplateMixin, Resour
def _extra_job_type_errors(self, data):
"""
Used to enforce 2 special cases around scan jobs and prompting
- the inventory can not be changed on a scan job template
- scan jobs can not be switched to run/check type and vice versa
- the inventory cannot be changed on a scan job template
- scan jobs cannot be switched to run/check type and vice versa
"""
errors = {}
if 'job_type' in data and self.ask_job_type_on_launch:
if ((self.job_type == PERM_INVENTORY_SCAN and not data['job_type'] == PERM_INVENTORY_SCAN) or
(data['job_type'] == PERM_INVENTORY_SCAN and not self.job_type == PERM_INVENTORY_SCAN)):
errors['job_type'] = _('Can not override job_type to or from a scan job.')
errors['job_type'] = _('Cannot override job_type to or from a scan job.')
if (self.job_type == PERM_INVENTORY_SCAN and ('inventory' in data) and self.ask_inventory_on_launch and
self.inventory != data['inventory']):
errors['inventory'] = _('Inventory can not be changed at runtime for scan jobs.')
errors['inventory'] = _('Inventory cannot be changed at runtime for scan jobs.')
return errors
@property
+1 -1
View File
@@ -120,7 +120,7 @@ class WorkflowNodeBase(CreatedModifiedModel):
prompts_dict = self.prompts_dict()
if not hasattr(ujt_obj, '_ask_for_vars_dict'):
if prompts_dict:
return {'ignored': {'all': 'Can not use prompts on unified_job_template that is not type of job template'}}
return {'ignored': {'all': 'Cannot use prompts on unified_job_template that is not type of job template'}}
else:
return {}