Reset current_user_id before execute backends.
This commit is contained in:
parent
54a41212df
commit
af3087abea
2 changed files with 1 additions and 2 deletions
|
@ -24,6 +24,7 @@ class Transaction::BackgroundJob
|
||||||
Setting.where(area: 'Transaction::Backend').order(:name).each {|setting|
|
Setting.where(area: 'Transaction::Backend').order(:name).each {|setting|
|
||||||
backend = Setting.get(setting.name)
|
backend = Setting.get(setting.name)
|
||||||
begin
|
begin
|
||||||
|
UserInfo.current_user_id = 1
|
||||||
integration = Kernel.const_get(backend).new(@item, @params)
|
integration = Kernel.const_get(backend).new(@item, @params)
|
||||||
integration.perform
|
integration.perform
|
||||||
rescue => e
|
rescue => e
|
||||||
|
|
|
@ -162,8 +162,6 @@ class Transaction::ClearbitEnrichment
|
||||||
if !organization
|
if !organization
|
||||||
organization = Organization.new(
|
organization = Organization.new(
|
||||||
shared: config['organization_shared'],
|
shared: config['organization_shared'],
|
||||||
updated_by_id: 1,
|
|
||||||
created_by_id: 1,
|
|
||||||
)
|
)
|
||||||
organization_sync_values.each {|destination, value|
|
organization_sync_values.each {|destination, value|
|
||||||
attribute = destination.sub(/^organization\./, '')
|
attribute = destination.sub(/^organization\./, '')
|
||||||
|
|
Loading…
Reference in a new issue