diff --git a/tailbone/views/users.py b/tailbone/views/users.py index fb81060a..e4182da9 100644 --- a/tailbone/views/users.py +++ b/tailbone/views/users.py @@ -612,14 +612,25 @@ class UserView(PrincipalMasterView): # display {'section': f'tailbone.{user.uuid}', 'option': 'user_css', - 'value': user_css}, + 'value': user_css, + 'save_if_empty': False}, ] def preferences_gather_settings(self, data, user): simple_settings = self.preferences_get_simple_settings(user) - return self.configure_gather_settings( + settings = self.configure_gather_settings( data, simple_settings=simple_settings, input_file_templates=False) + # TODO: ugh why does user_css come back as 'default' instead of None? + final_settings = [] + for setting in settings: + if setting['name'].endswith('.user_css'): + if setting['value'] == 'default': + continue + final_settings.append(setting) + + return final_settings + def preferences_remove_settings(self, user): app = self.get_rattail_app() simple_settings = self.preferences_get_simple_settings(user)