Permalink
Browse files

Prevent possible nil error

  • Loading branch information...
jkowens committed Sep 15, 2017
1 parent e8dd377 commit ca3f5f0a445161f6485cd052540387082529ee96
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/activerecord-import/adapters/postgresql_adapter.rb
@@ -177,7 +177,7 @@ def sql_for_conflict_target( args = {} )
if constraint_name.present?
"ON CONSTRAINT #{constraint_name} "
elsif conflict_target.present?
'(' << Array( conflict_target ).reject( &:empty? ).join( ', ' ) << ') '.tap do |sql|
'(' << Array( conflict_target ).reject( &:blank? ).join( ', ' ) << ') '.tap do |sql|
sql << "WHERE #{index_predicate} " if index_predicate
end
end

0 comments on commit ca3f5f0

Please sign in to comment.