mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 08:21:57 -04:00
Fix: Raise error if no QBO configuration is found in sync jobs
This commit is contained in:
@@ -15,7 +15,7 @@ class CustomerSyncJob < ApplicationJob
|
||||
# Perform a full sync of all customers, or an incremental sync of only those updated since the last sync
|
||||
def perform(full_sync: false, id: nil)
|
||||
qbo = Qbo.first
|
||||
return unless qbo
|
||||
raise "No QBO configuration found" unless qbo
|
||||
|
||||
log "Starting #{full_sync ? 'full' : 'incremental'} sync for customer ##{id || 'all'}..."
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class EmployeeSyncJob < ApplicationJob
|
||||
|
||||
def perform(full_sync: false, id: nil)
|
||||
qbo = Qbo.first
|
||||
return unless qbo
|
||||
raise "No QBO configuration found" unless qbo
|
||||
|
||||
log "Starting #{full_sync ? 'full' : 'incremental'} sync for employee ##{id || 'all'}..."
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class EstimateSyncJob < ApplicationJob
|
||||
|
||||
def perform(full_sync: false, id: nil, doc_number: nil)
|
||||
qbo = Qbo.first
|
||||
return unless qbo
|
||||
raise "No QBO configuration found" unless qbo
|
||||
|
||||
log "Starting #{full_sync ? 'full' : 'incremental'} sync for estimate ##{id || doc_number || 'all'}..."
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class InvoiceSyncJob < ApplicationJob
|
||||
|
||||
def perform(full_sync: false, id: nil)
|
||||
qbo = Qbo.first
|
||||
return unless qbo
|
||||
raise "No QBO configuration found" unless qbo
|
||||
|
||||
log "Starting #{full_sync ? 'full' : 'incremental'} sync for invoice ##{id || 'all'}..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user