From 7291e82ffc878394debbbb00e81dd565c6f6a128 Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Wed, 18 Mar 2020 12:25:42 -0100 Subject: [PATCH] mgr/dashboard: Remove duplicate code in iscsi.py Signed-off-by: Tiago Melo --- src/pybind/mgr/dashboard/controllers/iscsi.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pybind/mgr/dashboard/controllers/iscsi.py b/src/pybind/mgr/dashboard/controllers/iscsi.py index af504930000..ad3415f6b25 100644 --- a/src/pybind/mgr/dashboard/controllers/iscsi.py +++ b/src/pybind/mgr/dashboard/controllers/iscsi.py @@ -251,10 +251,6 @@ class IscsiTarget(RESTController): def delete(self, target_iqn): gateway = get_available_gateway() config = IscsiClient.instance(gateway_name=gateway).get_config() - if target_iqn not in config['targets']: - raise DashboardException(msg='Target does not exist', - code='target_does_not_exist', - component='iscsi') if target_iqn not in config['targets']: raise DashboardException(msg='Target does not exist', code='target_does_not_exist', -- 2.39.5