Fixed #2, removed initial check for existing entries, adding a separate one

This commit is contained in:
マリウス
2021-02-07 14:02:32 -04:00
parent ab78ffcd00
commit abc041381e
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ func NewEntry(
return Entry{}, err
}
if newEntry.IsFinishedAfterBegan() == false {
if id == "" && newEntry.IsFinishedAfterBegan() == false {
return Entry{}, errors.New("beginning time of tracking cannot be after finish time")
}