mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
(quality) reduce deletion delay
This is safe because AccountingLine does not have any delete dependency
This commit is contained in:
parent
9b5cf8842e
commit
05ba27289b
@ -15,7 +15,7 @@ class AccountingWorker
|
||||
|
||||
def invoices(invoices_ids)
|
||||
# clean
|
||||
AccountingLine.where(invoice_id: ids).destroy_all
|
||||
AccountingLine.where(invoice_id: ids).delete_all
|
||||
# build
|
||||
service = Accounting::AccountingService.new
|
||||
invoices = Invoice.where(id: invoices_ids)
|
||||
@ -24,7 +24,7 @@ class AccountingWorker
|
||||
|
||||
def all
|
||||
# clean
|
||||
AccountingLine.destroy_all
|
||||
AccountingLine.delete_all
|
||||
# build
|
||||
service = Accounting::AccountingService.new
|
||||
service.build_from_invoices(Invoice.all)
|
||||
|
Loading…
x
Reference in New Issue
Block a user