Fix Rubocop complaint

This commit is contained in:
Matt-Yorkley
2023-06-13 18:51:57 +01:00
parent 11382a518e
commit 52806a35ee

View File

@@ -226,7 +226,7 @@ class SplitCheckoutController < ::BaseController
adjustment = voucher.create_adjustment(voucher.code, @order)
if !adjustment.valid?
unless adjustment.valid?
@order.errors.add(:voucher, I18n.t('split_checkout.errors.add_voucher_error'))
adjustment.errors.each { |error| @order.errors.import(error) }
return false