Patch by Go MAEDA (@maeda).
git-svn-id: https://svn.redmine.org/redmine/trunk@22854
e93f8b46-1217-0410-a6f0-
8f06a7374b81
return
end
if !params[:set_filter] && use_session && session[:issue_query]
+ # Don't apply the default query if a valid query id is set in the session
query_id, project_id = session[:issue_query].values_at(:id, :project_id)
- return if IssueQuery.where(id: query_id).exists? && project_id == @project&.id
+ return if query_id && project_id == @project&.id && IssueQuery.exists?(id: query_id)
end
if default_query = IssueQuery.default(project: @project)
params[:query_id] = default_query.id