diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index e0c32ded..904ce843 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -150,7 +150,7 @@ class ArticlesController < ApplicationController # fallback to Others category category = (ArticleCategory.find_match(row[:category]) or no_category) # creates a new article and price - article = Article.new( :name => row[:name], + article = @supplier.articles.build(:name => row[:name], :note => row[:note], :manufacturer => row[:manufacturer], :origin => row[:origin],