From 4386432834436aa34863e640b9c1850448a9e9aa Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 16 Jan 2017 18:33:25 -0500 Subject: Fix preferences not loading correctly (#5084) --- api/user.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/user.go b/api/user.go index 701badfc9..7587b83ad 100644 --- a/api/user.go +++ b/api/user.go @@ -633,7 +633,11 @@ func getInitialLoad(c *Context, w http.ResponseWriter, r *http.Request) { } il.User.Sanitize(map[string]bool{}) - il.Preferences, err = app.GetPreferencesForUser(c.Session.Id) + il.Preferences, err = app.GetPreferencesForUser(c.Session.UserId) + if err != nil { + c.Err = err + return + } il.Teams, err = app.GetTeamsForUser(c.Session.UserId) if err != nil { -- cgit v1.2.3-1-g7c22