diff options
author | francis <francis> | 2008-05-16 01:14:12 +0000 |
---|---|---|
committer | francis <francis> | 2008-05-16 01:14:12 +0000 |
commit | dd1fed05800d9b58b3b48a90602bcadd0c20aa44 (patch) | |
tree | 94060313d22da960b87dcf736b52056995851292 /app/models/info_request.rb | |
parent | 93d2b1e2f2ef663fab39265017f3bc346a72bf48 (diff) |
Due to new alert types, can have a link between event and fact that sent
which is not of the request being tracked.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index b760d5910..dec1fe78d 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -21,7 +21,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.109 2008-05-15 17:40:43 francis Exp $ +# $Id: info_request.rb,v 1.110 2008-05-16 01:14:12 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -462,7 +462,10 @@ public track_thing.destroy end self.user_info_request_sent_alerts.each { |a| a.destroy } - self.info_request_events.each { |a| a.destroy } + self.info_request_events.each do |info_request_event| + info_request_event.track_things_sent_emails.each { |a| a.destroy } + info_request_event.destroy + end self.incoming_messages.each { |a| a.destroy } self.outgoing_messages.each { |a| a.destroy } self.destroy |