summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/security_groups
diff options
context:
space:
mode:
authormanchandavishal <manchandavishal143@gmail.com>2019-08-26 15:38:47 +0000
committermanchandavishal <manchandavishal143@gmail.com>2020-09-04 10:39:11 +0000
commitbe461acd6fcd097f554a5a4e95a4aa3f956080a0 (patch)
treeb85c9b1ec367f4077dbafffef11aa104d1119fa4 /openstack_dashboard/dashboards/project/security_groups
parent5081359295e5311ca725e80efa0bc4b2ec811a0e (diff)
downloadhorizon-be461acd6fcd097f554a5a4e95a4aa3f956080a0.tar.gz
Cleanup for Refactor-error-messages
This patch is a clean-up patch for refactor-error-messages bp which remove the exception message from base message otherwise the same exception message display twice like this https://ibb.co/XyFWMdz . Partially-Implements blueprint refactor-error-messages Change-Id: I46b632dbb6701785e7d654feff336a27d6ecea9c
Diffstat (limited to 'openstack_dashboard/dashboards/project/security_groups')
-rw-r--r--openstack_dashboard/dashboards/project/security_groups/forms.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/openstack_dashboard/dashboards/project/security_groups/forms.py b/openstack_dashboard/dashboards/project/security_groups/forms.py
index ab461f2c0..d9c88527e 100644
--- a/openstack_dashboard/dashboards/project/security_groups/forms.py
+++ b/openstack_dashboard/dashboards/project/security_groups/forms.py
@@ -66,10 +66,9 @@ class GroupBase(forms.SelfHandlingForm):
sg = self._call_network_api(request, data)
messages.success(request, self.success_message % sg.name)
return sg
- except Exception as e:
+ except Exception:
redirect = reverse("horizon:project:security_groups:index")
- error_msg = self.error_message % e
- exceptions.handle(request, error_msg, redirect=redirect)
+ exceptions.handle(request, self.error_message, redirect=redirect)
class CreateGroup(GroupBase):