aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-08-21 07:43:16 +0100
committerRobin Houston <robin.houston@gmail.com>2012-08-21 07:43:16 +0100
commitbf4b97e16e0c1a699ddd2fc186ea3f8e962ec7bf (patch)
tree585367ec72352a52a2ed536a62046af5c38f92b5 /app/models/info_request.rb
parentf2115fe4357d232d0e8a373881790a9a38ee80f5 (diff)
Email admins about external requests too
If someone reports an external request as needing administrator attention, we should email the administrators about it. Thanks for spotting this, @crowbot.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 23e18b858..19ec949ba 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -567,8 +567,11 @@ public
self.calculate_event_states
- if self.requires_admin? && !self.is_external?
- RequestMailer.deliver_requires_admin(self, set_by)
+ if self.requires_admin?
+ # Check there is someone to send the message "from"
+ if !set_by.nil? || !self.user.nil?
+ RequestMailer.deliver_requires_admin(self, set_by)
+ end
end
end