Remove the function of messages.error in AddRouterRoute
The function of exceptions.handle can throw an error message,
no need messages.error
@@ -48,12 +48,10 @@ class AddRouterRoute(forms.SelfHandlingForm):
LOG.info('Invalid format for routes %(route)s: %(exc)s',
{'route': route, 'exc': e})
msg = _('Invalid format for routes: %s') % e
- messages.error(request, msg)
redirect = reverse(self.failure_url, args=[router_id])
exceptions.handle(request, msg, redirect=redirect)
except Exception as e:
LOG.info('Failed to add route: %s', e)
msg = _('Failed to add route: %s') % e
- messages.error(request, msg)
redirect = reverse(self.failure_url, args=[router_id])
exceptions.handle(request, msg, redirect=redirect)
