mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 07:57:20 +02:00
Dependencies - depend on self
- Prevented tasks from being specified as depending on themselves.
This commit is contained in:
parent
d87e7c6934
commit
98cef98111
1 changed files with 3 additions and 0 deletions
|
@ -470,6 +470,9 @@ void Task::removeAnnotations ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Task::addDependency (int id)
|
void Task::addDependency (int id)
|
||||||
{
|
{
|
||||||
|
if (id == this->id)
|
||||||
|
throw std::string ("A task cannot be dependent on itself.");
|
||||||
|
|
||||||
std::string uuid = context.tdb.uuid (id);
|
std::string uuid = context.tdb.uuid (id);
|
||||||
if (uuid == "")
|
if (uuid == "")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue