Added check for begin > finish time
This commit is contained in:
parent
b95c00a12d
commit
05f387b42a
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ func NewEntry(
|
|||
}
|
||||
}
|
||||
|
||||
if finishTime.Before(beginTime) && finishTime.IsZero() == false {
|
||||
return Entry{}, errors.New("Beginning time of tracking cannot be after the finish time!")
|
||||
}
|
||||
|
||||
return Entry{
|
||||
id,
|
||||
beginTime,
|
||||
|
|
Loading…
Reference in a new issue