From 44d889b90c2b3fcbf01923593fc11d5117d3ddf8 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 2 May 2017 14:11:59 +0200 Subject: [PATCH] Improved error handling. --- app/models/email_address.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/email_address.rb b/app/models/email_address.rb index 18a7b91f3..adc1e1089 100644 --- a/app/models/email_address.rb +++ b/app/models/email_address.rb @@ -28,14 +28,14 @@ check and if channel not exists reset configured channels for email addresses # set to active if channel exists if email_address.channel_id && Channel.find_by(id: email_address.channel_id) if !email_address.active - email_address.save + email_address.save! end next end # set in inactive if channel not longer exists next if !email_address.active - email_address.save + email_address.save! } end @@ -72,7 +72,7 @@ check and if channel not exists reset configured channels for email addresses group = Group.find_by(email_address_id: nil) group.email_address_id = id group.updated_by_id = updated_by_id - group.save + group.save! end end