@property
def last_activity(self):
- return self.actions.order_by('-action_date')[0].action_date
+ try:
+ return self.actions.order_by('-action_date')[0].action_date
+ except:
+ return None
@property
def gravatar(self):
{% if view_user.last_seen %}
<tr>
<td>{% trans "last seen" %}</td>
- <td><strong title="{{ view_user.last_activity }}">{% diff_date view_user.last_activity %}</strong></td>
+ <td><strong title="{{ view_user.last_activity }}">{% if view_user.last_activity %}{% diff_date view_user.last_activity %}{% else %}{% trans "Never" %}{% endif %}</strong></td>
</tr>
{% endif %}
{% if view_user.website %}