Fix bug.
This commit is contained in:
parent
7b31273523
commit
6c9cb2b23d
|
@ -126,7 +126,9 @@ class AsiaDatabasesController < ApplicationController
|
|||
asia_data = asia_data.page(params[:page_no]).per(OrbitHelper.page_data_count)
|
||||
end
|
||||
asia_data_list = []
|
||||
if !params['keywords'].nil?
|
||||
if params['keywords'].nil?
|
||||
asia_data = nil
|
||||
else
|
||||
if for_frontend
|
||||
asia_data_list = asia_data.collect do |asia_record|
|
||||
{'jps' => fields_to_show.map{|field| {"value"=> get_display_field(asia_record,field)}}}
|
||||
|
@ -178,7 +180,7 @@ class AsiaDatabasesController < ApplicationController
|
|||
"asia_databases" => asia_data_list,
|
||||
"headers" => table_headers,
|
||||
"extras" => extras,
|
||||
"total_pages" => asia_data.total_pages,
|
||||
"total_pages" => (asia_data ? asia_data.total_pages : 0),
|
||||
'choice_unit' => choice_unit,
|
||||
'choice_field' => choice_field
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue