From 79b31673e2a79eaa124976840e85757d2bebb887 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 19 Jul 2022 16:38:48 +0200 Subject: [PATCH] fix: return 9:00 as default time for reminders if none was set Resolves https://kolaente.dev/vikunja/api/issues/1211 --- pkg/user/user.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/user/user.go b/pkg/user/user.go index 6224617ebd2..8dd36093014 100644 --- a/pkg/user/user.go +++ b/pkg/user/user.go @@ -200,7 +200,7 @@ func (apiUser *APIUserPassword) APIFormat() *User { // GetUserByID gets informations about a user by its ID func GetUserByID(s *xorm.Session, id int64) (user *User, err error) { - // Apparently xorm does otherwise look for all users but return only one, which leads to returing one even if the ID is 0 + // Apparently xorm does otherwise look for all users but return only one, which leads to returning one even if the ID is 0 if id < 1 { return &User{}, ErrUserDoesNotExist{} } @@ -280,6 +280,10 @@ func getUser(s *xorm.Session, user *User, withEmail bool) (userOut *User, err er userOut.Email = "" } + if userOut.OverdueTasksRemindersTime == "" { + userOut.OverdueTasksRemindersTime = "9:00" + } + return userOut, err }