Improved error handling.
This commit is contained in:
parent
3c1c5d9835
commit
44d889b90c
1 changed files with 3 additions and 3 deletions
|
@ -28,14 +28,14 @@ check and if channel not exists reset configured channels for email addresses
|
||||||
# set to active if channel exists
|
# set to active if channel exists
|
||||||
if email_address.channel_id && Channel.find_by(id: email_address.channel_id)
|
if email_address.channel_id && Channel.find_by(id: email_address.channel_id)
|
||||||
if !email_address.active
|
if !email_address.active
|
||||||
email_address.save
|
email_address.save!
|
||||||
end
|
end
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
# set in inactive if channel not longer exists
|
# set in inactive if channel not longer exists
|
||||||
next if !email_address.active
|
next if !email_address.active
|
||||||
email_address.save
|
email_address.save!
|
||||||
}
|
}
|
||||||
end
|
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 = Group.find_by(email_address_id: nil)
|
||||||
group.email_address_id = id
|
group.email_address_id = id
|
||||||
group.updated_by_id = updated_by_id
|
group.updated_by_id = updated_by_id
|
||||||
group.save
|
group.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue