From 8b75f5c11b8a6fb017584a3926a01464a4040ce7 Mon Sep 17 00:00:00 2001 From: hernani Date: Tue, 31 Aug 2010 22:29:48 +0000 Subject: [PATCH] Better handling for the last_activity user profile info. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@581 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/models/user.py | 2 +- forum/skins/default/templates/users/info.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forum/models/user.py b/forum/models/user.py index b18047e..124ea17 100644 --- a/forum/models/user.py +++ b/forum/models/user.py @@ -159,7 +159,7 @@ class User(BaseModel, DjangoUser): try: return self.actions.order_by('-action_date')[0].action_date except: - return None + return self.last_seen @property def gravatar(self): diff --git a/forum/skins/default/templates/users/info.html b/forum/skins/default/templates/users/info.html index 382378f..efc49fd 100644 --- a/forum/skins/default/templates/users/info.html +++ b/forum/skins/default/templates/users/info.html @@ -51,7 +51,7 @@ {% if view_user.last_seen %} {% trans "last seen" %} - {% if view_user.last_activity %}{% diff_date view_user.last_activity %}{% else %}{% trans "Never" %}{% endif %} + {% diff_date view_user.last_activity %} {% endif %} {% if view_user.website %} -- 2.39.5