internal 500 error : 1.5.1 stable with redmine 3.0.1 when search in dmsf enabled project #373

This commit is contained in:
Karel Pičman 2015-04-24 14:43:02 +02:00
parent 266676d9a9
commit 48d83d571f
2 changed files with 6 additions and 6 deletions

View File

@ -320,11 +320,11 @@ class DmsfFile < ActiveRecord::Base
results = []
results_count = 0
includes(:project, :revisions).
joins(:project, :revisions).
where(project_conditions.join(' AND ') + " AND #{DmsfFile.table_name}.deleted = :false", {:false => false}).scoping do
where(find_options[:conditions]).order(find_options[:order]).scoping do
results_count = count(:all)
results = find(:all, limit_options)
results_count = count(:all)
results = where(limit_options)
end
end

View File

@ -309,13 +309,13 @@ class DmsfFolder < ActiveRecord::Base
results = []
results_count = 0
includes(:project).
joins(:project).
where(project_conditions.join(' AND ')).scoping do
where(find_options[:conditions]).order(find_options[:order]).scoping do
results_count = count(:all)
results = find(:all, limit_options)
results = where(limit_options)
end
end
end
[results, results_count]
end