fix error
This commit is contained in:
parent
f3b5133af3
commit
b84c4af63a
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue