mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
#21 Use open interval when no id given
- Add test - Special handling if database empty
This commit is contained in:
parent
4afd14ee2e
commit
c595132a9c
2 changed files with 22 additions and 1 deletions
|
@ -76,7 +76,17 @@ int CmdTag (
|
|||
|
||||
if (ids.empty ())
|
||||
{
|
||||
throw std::string ("At least one ID must be specified. See 'timew help tag'.");
|
||||
if (tracked.empty ())
|
||||
{
|
||||
throw std::string ("There is no active time tracking.");
|
||||
}
|
||||
|
||||
if (!tracked.back ().range.is_open ())
|
||||
{
|
||||
throw std::string ("At least one ID must be specified. See 'timew help tag'.");
|
||||
}
|
||||
|
||||
ids.insert (1);
|
||||
}
|
||||
|
||||
// Apply tags to ids.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue