Skip to content

Commit 681d843

Browse files
committed
Fix delete
1 parent ecce1cc commit 681d843

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Controller/Admin/QueueController.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,9 @@ public function resetJob($id = null) {
9191
* @return \Cake\Http\Response
9292
*/
9393
public function removeJob($id = null) {
94-
if (!$id) {
95-
throw new NotFoundException();
96-
}
94+
$queuedJob = $this->QueuedJobs->get($id);
9795

98-
$this->QueuedJobs->delete($id);
96+
$this->QueuedJobs->delete($queuedJob);
9997

10098
$this->Flash->success('Job # ' . $id . ' deleted');
10199

0 commit comments

Comments
 (0)