Fix bug.
This commit is contained in:
parent
3f3c966597
commit
1fa0351adf
|
@ -85,8 +85,8 @@ class Admin::UniversalTablesController < OrbitAdminController
|
|||
if !table.nil?
|
||||
sheet = workbook[0]
|
||||
if sheet.count <= 503
|
||||
columns = sheet[1].cells.collect{|c|
|
||||
table.table_columns.where(:key => c.value.to_s).first rescue nil
|
||||
columns = sheet[1].cells.collect.with_index{|c,i|
|
||||
c.value.blank? ? table.table_columns.where(:title => sheet[0].cells[i].value.to_s.split("-").first.strip).first : table.table_columns.where(:key => c.value.to_s).first
|
||||
}
|
||||
languages = sheet[2].cells.collect{|c|
|
||||
c.value.split("-").last rescue nil
|
||||
|
|
Loading…
Reference in New Issue