Tweak of error message wording for model-specific name

This commit is contained in:
AlanCoding 2018-11-13 13:16:43 -05:00 committed by Jake McDermott
parent c105885c7b
commit e0a28e32eb
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7

View File

@ -314,8 +314,9 @@ class SurveyJobTemplateMixin(models.Model):
# ignored variables does not block manual launch
if 'prompts' not in _exclude_errors:
errors['extra_vars'] = [_('Variables {list_of_keys} are not allowed on launch. Check the Prompt on Launch setting '+
'on the Job Template to include Extra Variables.').format(
list_of_keys=six.text_type(', ').join([six.text_type(key) for key in extra_vars.keys()]))]
'on the {model_name} to include Extra Variables.').format(
list_of_keys=six.text_type(', ').join([six.text_type(key) for key in extra_vars.keys()]),
model_name=self._meta.verbose_name.title())]
return (accepted, rejected, errors)