fix error

This commit is contained in:
邱博亞 2021-03-30 15:52:09 +08:00
parent c1a5e89d57
commit 3aeb2a993b
1 changed files with 1 additions and 1 deletions

View File

@ -2,6 +2,7 @@ module Admin::GalleriesHelper
def import_this_image(row,album) def import_this_image(row,album)
value = {} value = {}
image = AlbumImage.new image = AlbumImage.new
image.album = album
row.cells.each_with_index do |cell,index| row.cells.each_with_index do |cell,index|
val = cell.value rescue nil val = cell.value rescue nil
next if val.blank? next if val.blank?
@ -14,7 +15,6 @@ module Admin::GalleriesHelper
image.description_translations = value image.description_translations = value
end end
end end
image.album = album
image.save image.save
end end
end end