Fix bug where sending nil to update_card_id causes a crash

This commit is contained in:
Eric Schultz 2018-08-07 16:34:58 -05:00
parent 99e59d4fcc
commit 292d31132f

View file

@ -8,7 +8,7 @@ module UpdateRecurringDonations
# Update the card id and name for a given recurring donation (provide rd['donation_id'])
def self.update_card_id(rd, token)
rd = rd.with_indifferent_access
rd = rd&.with_indifferent_access
ParamValidation.new({rd: rd, token: token},
{
rd: {is_hash: true, required: true},