admin: fix error handling when importing a form

This commit is contained in:
Frédéric Péters 2014-11-06 10:22:20 +01:00
parent b4645a9771
commit 747bff77d7
1 changed files with 1 additions and 0 deletions

View File

@ -1491,6 +1491,7 @@ class FormsDirectory(AccessControlled, Directory):
form.set_error('file', _('You have to enter a file or a URL.'))
raise ValueError()
error, reason = False, None
try:
formdef = FormDef.import_from_xml(fp)
except FormdefImportError, e: