fix error

This commit is contained in:
chiu 2020-02-26 19:34:55 +08:00
parent f3b5133af3
commit b84c4af63a
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ class Admin::GalleriesController < OrbitAdminController
def index def index
album_length = Album.all.count album_length = Album.all.count
album_sort = Album.all.asc(:created_at) 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| album_sort.each_with_index do |album|
if album.album_colors.first.nil? if album.album_colors.first.nil?
album.album_colors.create('color' => 'transparent') album.album_colors.create('color' => 'transparent')