mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Use bang method
This commit is contained in:
parent
7723a30d1b
commit
12792d1482
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue