From c40c552a1dfb6112414972906edf427fae6d0a2d Mon Sep 17 00:00:00 2001 From: bohung Date: Sat, 31 Oct 2020 10:23:14 +0800 Subject: [PATCH] Fix bug. --- 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 f6a491d..8ae2d8f 100644 --- a/app/controllers/admin/galleries_controller.rb +++ b/app/controllers/admin/galleries_controller.rb @@ -276,7 +276,7 @@ class Admin::GalleriesController < OrbitAdminController @filter_fields.delete(:status) albums1 = Album.where(:order.in => [nil,-1]).desc(:created_at).with_categories(filters("category")).with_tags(filters("tag")) albums1 = search_data(albums1,[:name]) - albums2 = Album.where(:order.gt => -1).asc(:order).with_categories(filters("category")).with_tags(filters("tag")) + albums2 = Album.all.where(:order.ne=>-1).and(:order.ne=>nil).asc(:order).with_categories(filters("category")).with_tags(filters("tag")) albums2 = search_data(albums2,[:name]) @fiter_albums = albums1.concat(albums2) end