Write if as a one-liner and avoid extra queries

This commit is contained in:
Pau Perez
2021-04-26 12:39:03 +02:00
parent 002dabb80c
commit ee01b0162c

View File

@@ -766,9 +766,7 @@ module Spree
)
customer.save
if customer.invalid?
Bugsnag.notify(customer.errors.full_messages.join(", "))
end
Bugsnag.notify(customer.errors.full_messages.join(", ")) unless customer.persisted?
end
def update_adjustment!(adjustment)