From f494ec194164086d221d0fa4980342f1be95310f Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Wed, 26 Aug 2020 11:44:27 +0000 Subject: [PATCH] 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 . Change-Id: Ia9b66536afe2c0122b652c58d9e11235f962a71c --- blazar_dashboard/content/hosts/forms.py | 2 +- blazar_dashboard/content/leases/forms.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blazar_dashboard/content/hosts/forms.py b/blazar_dashboard/content/hosts/forms.py index 956dbea..3082479 100644 --- a/blazar_dashboard/content/hosts/forms.py +++ b/blazar_dashboard/content/hosts/forms.py @@ -47,7 +47,7 @@ class UpdateForm(forms.SelfHandlingForm): LOG.error('Error updating host: %s', e) exceptions.handle(request, message="An error occurred while updating this" - " host: %s. Please try again." % e) + " host. Please try again.") def clean(self): cleaned_data = super(UpdateForm, self).clean() diff --git a/blazar_dashboard/content/leases/forms.py b/blazar_dashboard/content/leases/forms.py index e0f11e5..1cd4f6e 100644 --- a/blazar_dashboard/content/leases/forms.py +++ b/blazar_dashboard/content/leases/forms.py @@ -208,7 +208,7 @@ class CreateForm(forms.SelfHandlingForm): LOG.error('Error submitting lease: %s', e) exceptions.handle(request, message='An error occurred while creating this ' - 'lease: %s. Please try again.' % e) + 'lease. Please try again.') def clean(self): cleaned_data = super(CreateForm, self).clean() @@ -313,7 +313,7 @@ class UpdateForm(forms.SelfHandlingForm): LOG.error('Error updating lease: %s', e) exceptions.handle(request, message="An error occurred while updating this" - " lease: %s. Please try again." % e) + " lease. Please try again.") def clean(self): cleaned_data = super(UpdateForm, self).clean()