mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task
- Delegated the modifiability check to Column::modifiable.
This commit is contained in:
parent
7aa55a8a71
commit
cefc129e9a
1 changed files with 4 additions and 8 deletions
12
src/Task.cpp
12
src/Task.cpp
|
@ -1960,17 +1960,13 @@ void Task::modify (modType type, bool text_required /* = false */)
|
|||
}
|
||||
else
|
||||
{
|
||||
// Some columns are not modifiable.
|
||||
if (name == "uuid" ||
|
||||
name == "id" ||
|
||||
name == "mask" ||
|
||||
name == "imask" ||
|
||||
name == "parent")
|
||||
throw format (STRING_INVALID_MOD, name, value);
|
||||
|
||||
// Get the column info.
|
||||
Column* column = context.columns[name];
|
||||
|
||||
// Some columns are not modifiable.
|
||||
if (! column->modifiable ())
|
||||
throw format (STRING_INVALID_MOD, name, value);
|
||||
|
||||
// Dependencies are specified as IDs.
|
||||
if (name == "depends")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue