Merge branch 'main' into develop
commit
362045f798
|
@ -467,15 +467,10 @@ class CRUDComponent extends Component
|
|||
if (!empty($params['contain'])) {
|
||||
$data->contain($params['contain']);
|
||||
}
|
||||
$data = $data->first();
|
||||
if (isset($params['beforeSave'])) {
|
||||
$data = $params['beforeSave']($data);
|
||||
if ($data === false) {
|
||||
$skipExecution = true;
|
||||
$success = false;
|
||||
}
|
||||
}
|
||||
if (!$skipExecution) {
|
||||
$data = $data->first();
|
||||
if (!empty($data)) {
|
||||
$success = $this->Table->delete($data);
|
||||
$success = true;
|
||||
|
@ -486,7 +481,6 @@ class CRUDComponent extends Component
|
|||
$bulkSuccesses++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$message = $this->getMessageBasedOnResult(
|
||||
$bulkSuccesses == count($ids),
|
||||
$isBulk,
|
||||
|
|
Loading…
Reference in New Issue