fix: return 9:00 as default time for reminders if none was set
Resolves https://kolaente.dev/vikunja/api/issues/1211
This commit is contained in:
parent
f8cc67d37f
commit
79b31673e2
1 changed files with 5 additions and 1 deletions
|
@ -200,7 +200,7 @@ func (apiUser *APIUserPassword) APIFormat() *User {
|
||||||
|
|
||||||
// GetUserByID gets informations about a user by its ID
|
// GetUserByID gets informations about a user by its ID
|
||||||
func GetUserByID(s *xorm.Session, id int64) (user *User, err error) {
|
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 {
|
if id < 1 {
|
||||||
return &User{}, ErrUserDoesNotExist{}
|
return &User{}, ErrUserDoesNotExist{}
|
||||||
}
|
}
|
||||||
|
@ -280,6 +280,10 @@ func getUser(s *xorm.Session, user *User, withEmail bool) (userOut *User, err er
|
||||||
userOut.Email = ""
|
userOut.Email = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if userOut.OverdueTasksRemindersTime == "" {
|
||||||
|
userOut.OverdueTasksRemindersTime = "9:00"
|
||||||
|
}
|
||||||
|
|
||||||
return userOut, err
|
return userOut, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue