Task Validation
- Cleaned up the 'delete' command due to the new validation code.
This commit is contained in:
@@ -79,7 +79,6 @@ int CmdDelete::execute (std::string& output)
|
|||||||
task->getStatus () == Task::waiting)
|
task->getStatus () == Task::waiting)
|
||||||
{
|
{
|
||||||
modify_task_annotate (*task, modifications);
|
modify_task_annotate (*task, modifications);
|
||||||
apply_defaults (*task);
|
|
||||||
|
|
||||||
std::string question = format (STRING_CMD_DELETE_QUESTION,
|
std::string question = format (STRING_CMD_DELETE_QUESTION,
|
||||||
task->id,
|
task->id,
|
||||||
@@ -112,9 +111,6 @@ int CmdDelete::execute (std::string& output)
|
|||||||
|
|
||||||
// Apply the command line modifications to the sibling.
|
// Apply the command line modifications to the sibling.
|
||||||
modify_task_annotate (*sibling, modifications);
|
modify_task_annotate (*sibling, modifications);
|
||||||
apply_defaults (*sibling);
|
|
||||||
|
|
||||||
sibling->validate ();
|
|
||||||
context.tdb.update (*sibling);
|
context.tdb.update (*sibling);
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
@@ -138,7 +134,6 @@ int CmdDelete::execute (std::string& output)
|
|||||||
if (! task->has ("end"))
|
if (! task->has ("end"))
|
||||||
task->setEnd ();
|
task->setEnd ();
|
||||||
|
|
||||||
task->validate ();
|
|
||||||
context.tdb.update (*task);
|
context.tdb.update (*task);
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
@@ -160,7 +155,6 @@ int CmdDelete::execute (std::string& output)
|
|||||||
if (! task->has ("end"))
|
if (! task->has ("end"))
|
||||||
task->setEnd ();
|
task->setEnd ();
|
||||||
|
|
||||||
task->validate ();
|
|
||||||
context.tdb.update (*task);
|
context.tdb.update (*task);
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user