Skip to content

Commit

Permalink
Merge pull request #1214 from internetee/always-calculate-invoice-vat…
Browse files Browse the repository at this point in the history
…-rate

Use bang method
  • Loading branch information
vohmar authored Jun 5, 2019
2 parents 0233be8 + 12792d1 commit 73838ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/data_migrations/populate_invoice_vat_rate.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace :data_migrations do
Invoice.transaction do
Invoice.where(vat_rate: nil).find_each do |invoice|
vat_rate = Invoice::VatRateCalculator.new(registrar: invoice.buyer).calculate
invoice.update_columns(vat_rate: vat_rate)
invoice.update!(vat_rate: vat_rate)

processed_invoice_count += 1
end
Expand Down

0 comments on commit 73838ad

Please sign in to comment.