From 8edd91781e53265fd012b0bb3f88725ac8369425 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 5 Jun 2020 23:01:08 +0800 Subject: [PATCH] Fix cannot upload problem caused by no AlbumVariable exist. --- app/controllers/admin/galleries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/galleries_controller.rb b/app/controllers/admin/galleries_controller.rb index ae08ddc..31aac6e 100644 --- a/app/controllers/admin/galleries_controller.rb +++ b/app/controllers/admin/galleries_controller.rb @@ -556,7 +556,7 @@ class Admin::GalleriesController < OrbitAdminController files.each do |file| image = album.album_images.new image.tags = (album.tags rescue []) - if AlbumVariable.first.count==1 + if(AlbumVariable.first.count==1 rescue true) image.file = file else album_unprocess.image_id = image.id