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:
Dustin J. Mitchell
2024-06-13 14:17:23 -04:00
committed by GitHub
parent 5821eda98e
commit e9c6c6c846

View File

@@ -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"));