diff options
-rw-r--r-- | app/controllers/request_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index b4f20ff42..241010049 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -251,6 +251,9 @@ class RequestController < ApplicationController end elsif params[:public_body_id] params[:info_request][:public_body] = PublicBody.find(params[:public_body_id]) + # Explicitly load the association as this isn't done automatically in newer Rails versions + elsif params[:info_request][:public_body_id] + params[:info_request][:public_body] = PublicBody.find(params[:info_request][:public_body_id]) end if !params[:info_request][:public_body] # compulsory to have a body by here, or go to front page which is start of process |