Use is_empty() instead of comparing with ""
This commit is contained in:
parent
dfe83aafc5
commit
33fceddc08
@ -401,7 +401,7 @@ pub fn update(
|
||||
user.preferred_theme = form
|
||||
.theme
|
||||
.clone()
|
||||
.and_then(|t| if &t == "" { None } else { Some(t) });
|
||||
.and_then(|t| if t.is_empty() { None } else { Some(t) });
|
||||
user.hide_custom_css = form.hide_custom_css;
|
||||
let _: User = user.save_changes(&*conn).map_err(Error::from)?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user