diff options
author | francis <francis> | 2009-06-16 17:28:16 +0000 |
---|---|---|
committer | francis <francis> | 2009-06-16 17:28:16 +0000 |
commit | e9a60b303fda16571d957ddc811c33dd9af6faab (patch) | |
tree | 7e627e2168d87b11a20436465d7c437a53060a4d /app/controllers/request_controller.rb | |
parent | 8dcf12262672476dcca90170053b7730e59b2775 (diff) |
Fix bug where follow up to defunct authority would cause errors.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 97181ddf7..1d6189915 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: request_controller.rb,v 1.161 2009-06-15 14:42:11 francis Exp $ +# $Id: request_controller.rb,v 1.162 2009-06-16 17:28:16 francis Exp $ class RequestController < ApplicationController @@ -433,6 +433,13 @@ class RequestController < ApplicationController raise sprintf("Incoming message %d does not belong to request %d", @incoming_message.info_request_id, @info_request.id) end + if !RequestMailer.is_followupable?(@info_request, @incoming_message) + raise "unexpected followupable inconsistency" if @info_request.public_body.is_requestable? + @reason = @info_request.public_body.not_requestable_reason + render :action => 'followup_bad' + return + end + # Force login early - this is really the "send followup" form. We want # to make sure they're the right user first, before they start writing a # message and wasting their time if they are not the requester. |