Skip to content
Snippets Groups Projects
Commit 2bd9df5f authored by Rich's avatar Rich
Browse files

Fix issue #5: now possible to delete API outputs

parent 440229e6
No related branches found
No related tags found
1 merge request!10Fix Issue 5: allow deleting API outputs
......@@ -117,7 +117,10 @@ class CRM_Dataprocessor_Form_Output extends CRM_Core_Form {
'id' => $this->id,
]);
civicrm_api3('Navigation', 'delete', ['id' => $result['values'][0]['configuration']['navigation_id']]);
$navigation_id = $result['values'][0]['configuration']['navigation_id'] ?? NULL;
if ($navigation_id) {
civicrm_api3('Navigation', 'delete', ['id' => $navigation_id]);
}
civicrm_api3('DataProcessorOutput', 'delete', array('id' => $this->id));
$session->setStatus(E::ts('Data Processor Output removed'), E::ts('Removed'), 'success');
CRM_Core_BAO_Navigation::resetNavigation();
......@@ -139,4 +142,4 @@ class CRM_Dataprocessor_Form_Output extends CRM_Core_Form {
parent::postProcess();
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment