mirror of
https://github.com/Threnklyn/zeit.git
synced 2026-06-07 14: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{
|
return Entry{
|
||||||
id,
|
id,
|
||||||
beginTime,
|
beginTime,
|
||||||
|
|||||||
Reference in New Issue
Block a user