diff --git a/back-office/lib/tasks/ribica.rake b/back-office/lib/tasks/ribica.rake index 6a750fb..70bac9b 100644 --- a/back-office/lib/tasks/ribica.rake +++ b/back-office/lib/tasks/ribica.rake @@ -195,10 +195,13 @@ def import_single_item(row, index, logger) item = (Item.find_by code: code) || Item.new item.name = row[lookup[:name_on_ribica]] item.code = code - item.current_input_price = 0 #row[lookup[:current_input_price]] || 11.00 - item.list_price = 0 #row[lookup[:list_price]] || 12.00 + if item.new_record? + item.current_input_price = 0 #row[lookup[:current_input_price]] || 11.00 + item.list_price = 0 #row[lookup[:list_price]] || 12.00 + end item.units_in_pack = row[lookup[:units_in_pack]] - item.description = row[lookup[:description]] || "default description" + item.description = row[lookup[:description]] + item.description ||= item.name item.stock = row[lookup[:stock]] item.on_display = row[lookup[:on_display]] item.tags = row[lookup[:tags]]