This patch fixes #701 .
The issue occurs because form value of
"" when user selects “Default theme” and it is set as preferred theme name. There’s no theme named
"", so any theme is not applied. By setting
users.preferred_theme when “Default theme” is selected, instance theme is used as the user’s preferred theme.
I used Diesel’s
#[changeset_options(treat_none_as_null="true")] attribute on
User model. This may not be preferred but
save_changes doesn’t have option to set
NULL sometimes and keep current value otherwise(See http://diesel.rs/guides/all-about-updates/ . It says “Diesel doesn’t currently provide a way to explicitly assign a field to its default value”). This is the reason why I used that attribute, but it may have too wide inpact. Could you consider?