providers/saml: show error message why import failed
This commit is contained in:
parent
1b9d22615c
commit
e69834dec4
|
@ -272,6 +272,11 @@ class MetadataImportView(LoginRequiredMixin, FormView):
|
||||||
provider = metadata.to_provider(form.cleaned_data["provider_name"])
|
provider = metadata.to_provider(form.cleaned_data["provider_name"])
|
||||||
provider.save()
|
provider.save()
|
||||||
messages.success(self.request, _("Successfully created Provider"))
|
messages.success(self.request, _("Successfully created Provider"))
|
||||||
except ValueError:
|
except ValueError as exc:
|
||||||
messages.error(self.request, _("Failed to import Metadata."))
|
LOGGER.warning(exc)
|
||||||
|
messages.error(
|
||||||
|
self.request,
|
||||||
|
_("Failed to import Metadata: %(message)s", {"message": str(exc)}),
|
||||||
|
)
|
||||||
|
return super().form_invalid(form)
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
Reference in New Issue