more information in the logs when errors during the import + import asset collections without custom fields

This commit is contained in:
dinedine 2011-01-30 00:20:15 +01:00
parent e896618c99
commit da51dbc14e
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ module Admin
redirect_to Locomotive.config.delayed_job ? admin_import_url : new_admin_import_url
rescue Exception => e
logger.error "[Locomotive import] #{e.message}"
logger.error "[Locomotive import] #{e.message} / #{e.backtrace}"
@error = t('errors.messages.invalid_theme_file')
flash[:alert] = t('flash.admin.imports.create.alert')

View File

@ -37,6 +37,8 @@ module Locomotive
end
def add_or_update_fields(asset_collection, fields)
return if fields.blank?
fields.each_with_index do |data, position|
name, data = data.keys.first, data.values.first