Skip to content

Commit

Permalink
Fix two things noted by houndci-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
wildbillcat committed Apr 27, 2020
1 parent 776cfdb commit df21004
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/app/models/spree/promotion_handler/coupon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def apply
if coupon_code.present?
if promotion.present? && promotion.active? && promotion.actions.exists?
handle_present_promotion(promotion)
elsif promotion_code && promotion_code.promotion.expired?
elsif promotion_code&.promotion&.expired?
set_error_code :coupon_code_expired
else
set_error_code :coupon_code_not_found
Expand Down
12 changes: 6 additions & 6 deletions core/lib/spree/core/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ class Engine < ::Rails::Engine
'Spree::LineItem::CurrencyMismatch will not be raised anymore.',
caller
)
if Spree::Config.actionless_promotion_inactive == true
Spree::Deprecation.warn(
'Spree::Config.actionless_promotion_inactive set to false is ' \
end
if Spree::Config.actionless_promotion_inactive == true
Spree::Deprecation.warn(
'Spree::Config.actionless_promotion_inactive set to false is ' \
'deprecated. Please note that by switching this value, ' \
'promotions with no actions will be active.',
caller
)
end
caller
)
end
end

Expand Down

0 comments on commit df21004

Please sign in to comment.