mirror of
https://github.com/ansible/awx.git
synced 2026-04-23 02:35:23 -02:30
Merge pull request #3215 from vismay-golwala/survey_allow_empty_defaults
Allow empty default values for numerical survey answers. Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -2530,7 +2530,7 @@ class JobTemplateSurveySpec(GenericAPIView):
|
||||
).format(
|
||||
allowed_types=', '.join(JobTemplateSurveySpec.ALLOWED_TYPES.keys()), **context
|
||||
)))
|
||||
if 'default' in survey_item:
|
||||
if 'default' in survey_item and survey_item['default'] != '':
|
||||
if not isinstance(survey_item['default'], JobTemplateSurveySpec.ALLOWED_TYPES[qtype]):
|
||||
type_label = 'string'
|
||||
if qtype in ['integer', 'float']:
|
||||
|
||||
Reference in New Issue
Block a user