Be resilient to a missing 'entry' in urgency (#3479)
Any combination of properties is possible - Taskwarrior should make the best of the tasks it finds, rather than crashing.
This commit is contained in:
committed by
GitHub
parent
5821eda98e
commit
e9c6c6c846
@@ -2319,7 +2319,8 @@ float Task::urgency_due () const
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
float Task::urgency_age () const
|
||||
{
|
||||
assert (has ("entry"));
|
||||
if (!has ("entry"))
|
||||
return 1.0;
|
||||
|
||||
Datetime now;
|
||||
Datetime entry (get_date ("entry"));
|
||||
|
||||
Reference in New Issue
Block a user