diff --git a/app/controllers/admin/galleries_controller.rb b/app/controllers/admin/galleries_controller.rb index 01705c1..b3b60fb 100644 --- a/app/controllers/admin/galleries_controller.rb +++ b/app/controllers/admin/galleries_controller.rb @@ -271,7 +271,7 @@ class Admin::GalleriesController < OrbitAdminController def index album_length = Album.all.count album_sort = Album.all.asc(:created_at) - if album_sort.first.album_colors.first.nil? + if (album_sort.first.album_colors.first.nil? rescue false) album_sort.each_with_index do |album| if album.album_colors.first.nil? album.album_colors.create('color' => 'transparent')