mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Fix case when JSON does not contain a start date
This commit is contained in:
parent
af8cd7eb40
commit
043fea04e9
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ Interval IntervalFactory::fromJson (std::string jsonString)
|
|||
}
|
||||
|
||||
json::string* start = (json::string*) json->_data["start"];
|
||||
interval.start = Datetime(start->_data);
|
||||
interval.start = (start != nullptr) ? Datetime(start->_data) : 0;
|
||||
json::string* end = (json::string*) json->_data["end"];
|
||||
interval.end = (end != nullptr) ? Datetime(end->_data) : 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue