Dependencies - depend on self
- Prevented tasks from being specified as depending on themselves.
This commit is contained in:
@@ -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 == "")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user