aboutsummaryrefslogtreecommitdiffstats
path: root/timetask/time_entry.go
diff options
context:
space:
mode:
authorTeddy Wing2017-03-12 18:45:06 +0100
committerTeddy Wing2017-03-12 18:45:06 +0100
commit72ce73048e3c04982012c7900eef080ca5b1f726 (patch)
tree09f65a0a7890eaf93a6870618ead10244465b8d0 /timetask/time_entry.go
parent378a38f5550f9a73feeb3e32ad74dec6e36e2527 (diff)
downloadtimetasker-72ce73048e3c04982012c7900eef080ca5b1f726.tar.bz2
TimeEntry.UnmarshalYAML: Don't error if date empty string
The date is allowed to be empty in the config defaults hash. Don't error if it is.
Diffstat (limited to 'timetask/time_entry.go')
-rw-r--r--timetask/time_entry.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/timetask/time_entry.go b/timetask/time_entry.go
index 32e2825..17a8e0c 100644
--- a/timetask/time_entry.go
+++ b/timetask/time_entry.go
@@ -34,7 +34,7 @@ func (te *TimeEntry) UnmarshalYAML(unmarshal func(interface{}) error) error {
}
date, err := time.Parse("2006-01-02", auxiliary.Date)
- if err != nil {
+ if auxiliary.Date != "" && err != nil {
return err
}