fixed Enhancement #3384

This commit is contained in:
Cayo Puigdefabregas 2022-05-12 10:33:04 +02:00
parent 515f31c562
commit 9b6d77573f
1 changed files with 2 additions and 1 deletions

View File

@ -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)