fixed wrong error message: recon task is not necessarily linked to script

This commit is contained in:
alejandro-campos 2020-11-11 09:52:15 +01:00
parent 41b603d5a0
commit fc429efce2
1 changed files with 9 additions and 16 deletions

View File

@ -350,18 +350,12 @@ class ManageNetScanScripts extends Wizard
['id_recon_script' => $id_script]
);
if (!$result_dlt) {
$result = [
'error' => 1,
'msg' => __('Problem deleting Net scan Scripts'),
];
} else {
$result_dlt2 = db_process_sql_delete(
'trecon_task',
['id_recon_script' => $id_script]
);
if (!$result_dlt2) {
if (!$result_dlt) {
$result = [
'error' => 1,
'msg' => __('Problem deleting Net scan Scripts'),
@ -372,7 +366,6 @@ class ManageNetScanScripts extends Wizard
'msg' => __('Deleted successfully'),
];
}
}
return $result;