diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/public_body.rb | 6 | ||||
-rw-r--r-- | app/views/public_body/show.rhtml | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index d1ed74110..841e1e881 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -509,12 +509,14 @@ class PublicBody < ActiveRecord::Base return self.request_email_domain end + # Returns nil if configuration variable not set def override_request_email - MySociety::Config.get("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "") + e = MySociety::Config.get("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "") + e if e != "" end def request_email - if override_request_email != "" + if override_request_email override_request_email else read_attribute(:request_email) diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index 70c5100ee..56a75f28c 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -65,7 +65,7 @@ <%= _('For an unknown reason, it is not possible to make a request to this authority.')%> <% end %> - <% if @public_body.override_request_email != "" %> + <% if @public_body.override_request_email %> <p> <strong>Note:</strong> Because we're testing, requests are being sent to <%= @public_body.override_request_email %> rather than to the actual authority. </p> |