diff options
author | Francis Irving <francis@mysociety.org> | 2010-10-20 16:41:08 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-10-20 16:41:08 +0100 |
commit | 803bd1b481867c3c1cd1825e67e199ecea1d9cf1 (patch) | |
tree | b424bbbd02829ab7e3a63018cfe1dae67cab5c25 | |
parent | 4f3a1a70488ab751663125c5cd2e1a376c064f5c (diff) |
Only show display_status when can
-rw-r--r-- | app/models/info_request_event.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 329c10504..1b22fa547 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -377,7 +377,6 @@ class InfoRequestEvent < ActiveRecord::Base # params_yaml has possibly sensitive data in it, don't include it :created_at => self.created_at, :described_state => self.described_state, - :display_status => self.display_status, :calculated_state => self.calculated_state, :last_described_at => self.last_described_at, :incoming_message_id => self.incoming_message_id, @@ -389,6 +388,10 @@ class InfoRequestEvent < ActiveRecord::Base # perhaps can call with @template somehow } + if self.is_incoming_message? || self.is_outgoing_message? + ret[:display_status] = self.display_status + end + if !snippet_highlight_proc.nil? ret[:snippet] = snippet_highlight_proc.call(self.search_text_main(true)) end |