Skip to content

Commit

Permalink
Fix delete TaskWrapper of type NORMAL failing
Browse files Browse the repository at this point in the history
A normal type TaskWrapper requires the 'delete' function, instead the of the
'deleteTask'. The latter only deletes the task and not the TaskWrapper.
  • Loading branch information
rixvet committed Aug 24, 2023
1 parent 664d9e6 commit 56ec2d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inc/apiv2/model/taskwrappers.routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ protected function deleteObject(object $object): void {
$jF = new JoinFilter(Factory::getTaskWrapperFactory(), Task::TASK_WRAPPER_ID, TaskWrapper::TASK_WRAPPER_ID);
$joined = Factory::getTaskFactory()->filter([Factory::FILTER => $qF, Factory::JOIN => $jF]);
$task = $joined[Factory::getTaskFactory()->getModelName()][0];

TaskUtils::deleteTask($task);
// api=true to avoid TaskUtils::delete setting 'Location:' header
TaskUtils::delete($task->getId(), $this->getCurrentUser(), true);
break;
case DTaskTypes::SUPERTASK:
TaskUtils::deleteSupertask($object->getId(), $this->getCurrentUser());
Expand Down

0 comments on commit 56ec2d0

Please sign in to comment.