chore: Use "create!" and "save!" bang methods when not checking the result (#5358)

* Use "create!" when not checking for errors on the result
* Use "save!" when not checking the result
This commit is contained in:
Jordan Brough
2022-09-13 08:10:06 -04:00
committed by GitHub
parent 44f498be6d
commit 59b31615ed
30 changed files with 47 additions and 47 deletions

View File

@@ -84,7 +84,7 @@ class Integrations::Csml::ProcessorService < Integrations::BotProcessorService
end
def process_text_messages(message_payload, conversation)
conversation.messages.create(
conversation.messages.create!(
{
message_type: :outgoing,
account_id: conversation.account_id,
@@ -99,7 +99,7 @@ class Integrations::Csml::ProcessorService < Integrations::BotProcessorService
buttons = message_payload['content']['buttons'].map do |button|
{ title: button['content']['title'], value: button['content']['payload'] }
end
conversation.messages.create(
conversation.messages.create!(
{
message_type: :outgoing,
account_id: conversation.account_id,