mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Move start of transaction down to actual database methods
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
b5aec4db8b
commit
06a4235b10
1 changed files with 1 additions and 3 deletions
|
@ -52,8 +52,6 @@ int CmdContinue (
|
||||||
throw std::string ("You can only specify one ID to continue.");
|
throw std::string ("You can only specify one ID to continue.");
|
||||||
}
|
}
|
||||||
|
|
||||||
journal.startTransaction ();
|
|
||||||
|
|
||||||
Interval to_copy;
|
Interval to_copy;
|
||||||
|
|
||||||
if (ids.size() == 1)
|
if (ids.size() == 1)
|
||||||
|
@ -115,9 +113,9 @@ int CmdContinue (
|
||||||
to_copy.start = start_time;
|
to_copy.start = start_time;
|
||||||
to_copy.end = end_time;
|
to_copy.end = end_time;
|
||||||
|
|
||||||
|
journal.startTransaction ();
|
||||||
validate (cli, rules, database, to_copy);
|
validate (cli, rules, database, to_copy);
|
||||||
database.addInterval (to_copy, verbose);
|
database.addInterval (to_copy, verbose);
|
||||||
|
|
||||||
journal.endTransaction ();
|
journal.endTransaction ();
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue