Fix syncing articles with non-import sync methods (#633)

This commit is contained in:
wvengen 2019-03-23 18:31:22 +01:00
parent d669edb173
commit 9283ed4f5e
3 changed files with 66 additions and 2 deletions

View file

@ -55,7 +55,7 @@ class Supplier < ApplicationRecord
unless shared_sync_method == 'import'
shared_supplier
.shared_articles
.where.not(id: existing_articles)
.where.not(id: existing_articles.to_a)
.each { |shared_article| new_articles << shared_article.build_new_article(self) }
end
return [updated_article_pairs, outlisted_articles, new_articles]