Fix cannot upload problem caused by no AlbumVariable exist.
This commit is contained in:
parent
81bdeb379e
commit
8edd91781e
|
@ -556,7 +556,7 @@ class Admin::GalleriesController < OrbitAdminController
|
||||||
files.each do |file|
|
files.each do |file|
|
||||||
image = album.album_images.new
|
image = album.album_images.new
|
||||||
image.tags = (album.tags rescue [])
|
image.tags = (album.tags rescue [])
|
||||||
if AlbumVariable.first.count==1
|
if(AlbumVariable.first.count==1 rescue true)
|
||||||
image.file = file
|
image.file = file
|
||||||
else
|
else
|
||||||
album_unprocess.image_id = image.id
|
album_unprocess.image_id = image.id
|
||||||
|
|
Loading…
Reference in New Issue