Fix YAMLLoadWarning

This commit is contained in:
Jeremy Stretch 2019-10-01 16:39:11 -04:00
parent ee4e68b082
commit 88d61db384

View File

@ -756,7 +756,7 @@ class ImportForm(BootstrapMixin, forms.Form):
})
else:
try:
self.cleaned_data['data'] = yaml.load(data)
self.cleaned_data['data'] = yaml.load(data, Loader=yaml.SafeLoader)
except yaml.scanner.ScannerError as err:
raise forms.ValidationError({
'data': "Invalid YAML data: {}".format(err)