Skip to content

Commit

Permalink
Use bang method
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Beljajev committed Jun 4, 2019
1 parent 7723a30 commit 12792d1
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 12792d1

Please sign in to comment.