Fix cannot upload problem caused by no AlbumVariable exist.

This commit is contained in:
chiu 2020-06-05 23:01:08 +08:00
parent 81bdeb379e
commit 8edd91781e
1 changed files with 1 additions and 1 deletions

View File

@ -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