add update_category as option

This commit is contained in:
viehlieb 2023-03-29 16:16:54 +02:00
parent 109286f0d7
commit 317379ed40
5 changed files with 54 additions and 4 deletions

View file

@ -5,6 +5,8 @@ ArticlesController.class_eval do
options = { filename: uploaded_file.original_filename }
options[:outlist_absent] = (params[:articles]['outlist_absent'] == '1')
options[:convert_units] = (params[:articles]['convert_units'] == '1')
options[:update_category] = (params[:articles]['update_category'] == '1')
@updated_article_pairs, @outlisted_articles, @new_articles = @supplier.sync_from_file uploaded_file.tempfile, type, options
if @updated_article_pairs.empty? && @outlisted_articles.empty? && @new_articles.empty?
redirect_to supplier_articles_path(@supplier), :notice => I18n.t('articles.controller.parse_upload.notice')