Skip to content

Commit

Permalink
bug(Cache) - Only take the column names present on Fee when creating …
Browse files Browse the repository at this point in the history
…one from cache (#2568)

## Description

The cached Fee objects are not considered when migrating. Instead of
bumping caches, we'll start by just slicing only the support column
names.
  • Loading branch information
nudded authored Sep 11, 2024
1 parent d2f5348 commit 87811e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/invoices/customer_usage_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def charge_usage(charge)
fees_result.fees.to_json
end

JSON.parse(json).map { |j| Fee.new(j) }
JSON.parse(json).map { |j| Fee.new(j.slice(*Fee.column_names)) }
end

def charge_usage_without_cache(charge)
Expand Down

0 comments on commit 87811e1

Please sign in to comment.