mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-07 21:07:20 +02:00
Issue warnings instead of errors for 'weird' tasks (#3646)
* Issue warnings instead of errors for 'weird' tasks * Support more comprehensive checks when adding a task
This commit is contained in:
parent
4bf6144daf
commit
96c72f3e06
5 changed files with 43 additions and 17 deletions
|
@ -174,6 +174,9 @@ void CmdImport::importSingleTask(json::object* obj) {
|
|||
// Parse the whole thing, validate the data.
|
||||
Task task(obj);
|
||||
|
||||
// An empty task is probably not intentional - at least a UUID should be included.
|
||||
if (task.is_empty()) throw format("Cannot import an empty task.");
|
||||
|
||||
auto hasGeneratedEntry = not task.has("entry");
|
||||
auto hasExplicitEnd = task.has("end");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue