mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-04 01:01:59 -04:00
Improved qbo hooks to allow a single entity or an array of entities
This commit is contained in:
@@ -47,8 +47,10 @@ class WebhookProcessJob < ActiveJob::Base
|
||||
# Allow other plugins to add addtional qbo entities via Hooks
|
||||
Redmine::Hook.call_hook( :qbo_additional_entities ).each do |context|
|
||||
next unless context
|
||||
entities.push context
|
||||
log "Added additional QBO entities: #{context}"
|
||||
Array(context).each do |entity|
|
||||
jobs.push(entity)
|
||||
log "Added additional QBO entity #{entity}"
|
||||
end
|
||||
end
|
||||
return unless entities.include?(name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user