mirror of
https://github.com/Threnklyn/zeit.git
synced 2026-05-19 05:13:31 +02:00
Added check for begin > finish time
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user