1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

yet another extra_vars fix

This commit is contained in:
Chris Meyers 2015-04-28 07:57:24 -04:00
parent 2830095b07
commit cea9dbdb4f

View File

@ -1801,6 +1801,9 @@ class JobLaunchSerializer(BaseSerializer):
except (yaml.YAMLError, TypeError, AttributeError):
raise serializers.ValidationError(dict(extra_vars=['Must be valid JSON or YAML']))
if not isinstance(extra_vars, dict):
extra_vars = {}
if self.get_survey_enabled(obj):
validation_errors = obj.survey_variable_validation(extra_vars)
if validation_errors: