mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Gracefully handle invalid query parameters for custom fields (#35312).
Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@21012 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -29,6 +29,7 @@ class IssuesController < ApplicationController
|
||||
accept_api_auth :index, :show, :create, :update, :destroy
|
||||
|
||||
rescue_from Query::StatementInvalid, :with => :query_statement_invalid
|
||||
rescue_from Query::QueryError, :with => :query_error
|
||||
|
||||
helper :journals
|
||||
helper :projects
|
||||
@@ -470,6 +471,11 @@ class IssuesController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def query_error(exception)
|
||||
session.delete(:issue_query)
|
||||
super
|
||||
end
|
||||
|
||||
def retrieve_previous_and_next_issue_ids
|
||||
if params[:prev_issue_id].present? || params[:next_issue_id].present?
|
||||
@prev_issue_id = params[:prev_issue_id].presence.try(:to_i)
|
||||
|
||||
Reference in New Issue
Block a user