mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Relax type checking requirements for floats since javascript passively
converts whole number floats to ints
This commit is contained in:
parent
c43a7be99e
commit
21e4afca14
@ -270,8 +270,8 @@ class JobTemplate(UnifiedJobTemplate, JobOptions):
|
||||
if 'max' in survey_element and survey_element['max'] != "" and data[survey_element['variable']] > survey_element['max']:
|
||||
errors.append("'%s' value %s is too large (must be no more than%s)" %
|
||||
(survey_element['variable'], data[survey_element['variable']], survey_element['max']))
|
||||
if type(data[survey_element['variable']]) != float:
|
||||
errors.append("Value %s for %s expected to be a float" % (data[survey_element['variable']],
|
||||
if type(data[survey_element['variable']]) not in (float, int):
|
||||
errors.append("Value %s for %s expected to be a numeric type" % (data[survey_element['variable']],
|
||||
survey_element['variable']))
|
||||
elif survey_element['type'] == 'multiselect':
|
||||
if survey_element['variable'] in data:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user