From 02963b03dc619d94fc8fc6b5ee4d848950a1fa9a Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 17 Mar 2014 12:42:51 +1100 Subject: [PATCH] BUGFIX: last_seen_at can be nil --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 105f305dd0d..f206018d486 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -567,7 +567,7 @@ class User < ActiveRecord::Base return I18n.t('redirected_to_top_reasons.new_user') if trust_level == 0 && created_at > SiteSetting.redirect_new_users_to_top_page_duration.days.ago # long-time-no-see user - return I18n.t('redirected_to_top_reasons.not_seen_in_a_month') if last_seen_at < 1.month.ago + return I18n.t('redirected_to_top_reasons.not_seen_in_a_month') if last_seen_at && last_seen_at < 1.month.ago nil end