mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Preferences: Fixing preference PUT validation (#68557)
This commit is contained in:
parent
8390fcc80f
commit
3ffbd2a1db
@ -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 {
|
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)
|
return response.Error(http.StatusBadRequest, "Invalid theme", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user