From: Tiago Melo Date: Wed, 18 Mar 2020 13:25:42 +0000 (-0100) Subject: mgr/dashboard: Remove duplicate code in iscsi.py X-Git-Tag: v15.2.2~60^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=187b8dbf3bfee27eed69fb8e9f698dffb15c2bb9;p=ceph.git mgr/dashboard: Remove duplicate code in iscsi.py Signed-off-by: Tiago Melo (cherry picked from commit 7291e82ffc878394debbbb00e81dd565c6f6a128) --- diff --git a/src/pybind/mgr/dashboard/controllers/iscsi.py b/src/pybind/mgr/dashboard/controllers/iscsi.py index af5049300001..ad3415f6b254 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',