diff --git a/pkg/api/preferences.go b/pkg/api/preferences.go index 55c0535477e..b9626f49831 100644 --- a/pkg/api/preferences.go +++ b/pkg/api/preferences.go @@ -128,7 +128,7 @@ func (hs *HTTPServer) UpdateUserPreferences(c *contextmodel.ReqContext) response } func (hs *HTTPServer) updatePreferencesFor(ctx context.Context, orgID, userID, teamId int64, dtoCmd *dtos.UpdatePrefsCmd) response.Response { - if !pref.IsValidThemeID(dtoCmd.Theme) { + if dtoCmd.Theme != "" && !pref.IsValidThemeID(dtoCmd.Theme) { return response.Error(http.StatusBadRequest, "Invalid theme", nil) }