changeset 1338:9bfd2d0661b2

pages: fixed handling of DataError when posting data
author Goffi <goffi@goffi.org>
date Sat, 15 Aug 2020 23:28:44 +0200
parents f0648005cd11
children 3a1cb3c5702f
files libervia/server/pages.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/pages.py	Sat Aug 15 16:45:23 2020 +0200
+++ b/libervia/server/pages.py	Sat Aug 15 23:28:44 2020 +0200
@@ -1494,7 +1494,7 @@
             # something is wrong with the posted data, we re-display the page with a
             # warning notification
             session_data = self.host.getSessionData(request, session_iface.ISATSession)
-            session_data.setPageNotification(self, e.value.message, C.LVL_WARNING)
+            session_data.setPageNotification(self, str(e), C.LVL_WARNING)
             request.setResponseCode(C.HTTP_SEE_OTHER)
             request.setHeader("location", request.uri)
             request.finish()