Revert the original logic in code
Change Ibc743a552a43147153dd0ca3a46ab8d977c7ca0d changes the logic[1] in wrong way and for the test[2] as well. This patch corrects the same. [1] https://opendev.org/openstack/murano-dashboard/src/branch/master/muranodashboard/packages/views.py#L419 [2] https://opendev.org/openstack/murano-dashboard/src/branch/master/muranodashboard/tests/unit/packages/test_views.py#L488 Change-Id: I80f3aa160b41554fa319e6ced2edf5a39d366302
This commit is contained in:
parent
a85d874748
commit
90de7126e3
|
@ -416,7 +416,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
|
|||
if error:
|
||||
reason = error.get('message')
|
||||
except ValueError:
|
||||
raise
|
||||
raise original_e
|
||||
msg = _('Uploading package failed. {0}').format(reason)
|
||||
LOG.exception(msg)
|
||||
exceptions.handle(
|
||||
|
|
|
@ -485,7 +485,7 @@ class TestImportPackageWizard(helpers.APITestCase):
|
|||
mock_json.loads.side_effect = ValueError('test_error_message')
|
||||
original_e = ValueError('original_error_message')
|
||||
setattr(original_e, 'details', 'error_details')
|
||||
with self.assertRaisesRegex(ValueError, 'test_error_message'):
|
||||
with self.assertRaisesRegex(ValueError, 'original_error_message'):
|
||||
self.import_pkg_wizard._handle_exception(original_e)
|
||||
|
||||
@mock.patch.object(views, 'glance')
|
||||
|
|
Loading…
Reference in New Issue