From 9b6d77573f6f59ecd93bcf34b57d12078238883a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 12 May 2022 10:33:04 +0200 Subject: [PATCH] fixed Enhancement #3384 --- ereuse_devicehub/inventory/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index a09f4f5b..70c058a4 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -326,7 +326,8 @@ class NewAllocateView(NewActionView, DeviceListMix): messages.error('Action {} error!'.format(self.form.type.data)) for k, v in self.form.errors.items(): value = ';'.join(v) - messages.error('Action Error {key}: {value}!'.format(key=k, value=value)) + key = self.form[k].label.text + messages.error('Action Error {key}: {value}!'.format(key=key, value=value)) next_url = self.get_next_url() return flask.redirect(next_url)