lazy validation

This commit is contained in:
DavidBadura
2015-04-03 14:36:58 +00:00
parent 44274c6fc2
commit c026f2b954
3 changed files with 12 additions and 6 deletions

View File

@@ -205,9 +205,14 @@ class TaskManager
/**
* @param Task $task
* @throws TaskwarriorException
*/
private function edit(Task $task)
{
if ($task->isReccuring() && !$task->getRecurring()) {
throw new TaskwarriorException('You cannot remove the recurrence from a recurring task.');
}
$this->taskwarrior->modify(
[
'description' => $task->getDescription(),