diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-08-20 07:16:55 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-08-20 07:16:55 +0100 |
commit | 6f66fe8a30083a2fa49618b4dad828c0cef3b310 (patch) | |
tree | abc62b301805929908ae287a9b449044c3e81732 /app/models/info_request.rb | |
parent | 3979f7439254ceb5cdde8373a2b049829546431e (diff) |
External requests ought not to be considered old_unclassified
We certainly do not want to send reminder emails for such requests,
for example, since we do not know the email address to send them to.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 2f4a89d91..6426f6ea8 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -942,7 +942,7 @@ public last_response_created_at = last_event_time_clause('response') age = extra_params[:age_in_days] ? extra_params[:age_in_days].days : OLD_AGE_IN_DAYS params = {:select => "*, #{last_response_created_at} as last_response_time", - :conditions => ["awaiting_description = ? and #{last_response_created_at} < ? and url_title != 'holding_pen'", + :conditions => ["awaiting_description = ? and #{last_response_created_at} < ? and url_title != 'holding_pen' and user_id is not null", true, Time.now() - age], :order => "last_response_time"} params[:limit] = extra_params[:limit] if extra_params[:limit] @@ -960,6 +960,7 @@ public end def is_old_unclassified? + return false if user_id.nil? return false if !awaiting_description return false if url_title == 'holding_pen' last_response_event = get_last_response_event |