aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/file_request_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/file_request_controller.rb')
-rw-r--r--app/controllers/file_request_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/file_request_controller.rb b/app/controllers/file_request_controller.rb
index 2b62cb796..bfb2c27be 100644
--- a/app/controllers/file_request_controller.rb
+++ b/app/controllers/file_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: file_request_controller.rb,v 1.10 2007-09-17 10:13:45 francis Exp $
+# $Id: file_request_controller.rb,v 1.11 2007-10-03 17:13:50 francis Exp $
class FileRequestController < ApplicationController
def index
@@ -22,8 +22,10 @@ class FileRequestController < ApplicationController
@outgoing_message.info_request = @info_request
# This automatically saves dependent objects, such as @info_request, in the same transaction
- if not @info_request.save
+ if not @info_request.valid?
render :action => 'index'
+ elsif check_authentication
+ @info_request.save
end
# Save both models