Skip to content

Commit

Permalink
avoid calling Rails.cache.delete with nil
Browse files Browse the repository at this point in the history
  • Loading branch information
abdellani committed Dec 22, 2023
1 parent 100b28c commit 735eb5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/spree/admin/payment_methods_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def update_params

def clear_preference_cache
@payment_method.calculator.preferences.each_key do |key|
next unless @payment_method.calculator.preference_cache_key(key).present?

Rails.cache.delete(@payment_method.calculator.preference_cache_key(key))
end
end
Expand Down

0 comments on commit 735eb5b

Please sign in to comment.