From 1aa867893eab5c8a301fd2259ef6e345e6bd720d Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 24 Nov 2023 23:22:04 +0200 Subject: [PATCH] fix bcc address removal --- app/controllers/notifications_settings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/notifications_settings_controller.rb b/app/controllers/notifications_settings_controller.rb index 2189ccda..14139c55 100644 --- a/app/controllers/notifications_settings_controller.rb +++ b/app/controllers/notifications_settings_controller.rb @@ -12,7 +12,7 @@ class NotificationsSettingsController < ApplicationController def index; end def create - if @account_config.save + if @account_config.value.present? ? @account_config.save : @account_config.delete redirect_back fallback_location: settings_notifications_path, notice: 'Changes have been saved' else redirect_back fallback_location: settings_notifications_path, alert: 'Unable to save'