aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-03-31 23:19:16 +0000
committerfrancis <francis>2008-03-31 23:19:16 +0000
commit13a241e7b7d02eee5186c2df8283e80163418be6 (patch)
tree0011834420b8faf48ff2bc8b82f4ff50df296504 /app/models/info_request.rb
parent7a52e4eab86dc13f42161e925f00715f0cbf70a1 (diff)
Sort order specially for RSS
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 791bbf753..1bc6004aa 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -22,7 +22,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.77 2008-03-31 19:15:38 francis Exp $
+# $Id: info_request.rb,v 1.78 2008-03-31 23:19:16 francis Exp $
require 'digest/sha1'
@@ -244,10 +244,13 @@ public
curr_state = event.described_state
end
- if not curr_state.nil? and event.event_type == 'response'
- event.calculated_state = curr_state
+ if !curr_state.nil? && event.event_type == 'response'
+ if event.calculated_state != curr_state
+ event.calculated_state = curr_state
+ event.last_described_at = Time.now()
+ event.save!
+ end
curr_state = nil
- event.save!
end
end
end