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 00ff73e commit 12b16f9
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 if @payment_method.calculator.preference_cache_key(key).blank?

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

0 comments on commit 12b16f9

Please sign in to comment.