Don't let forum_time crash on empty times.
This commit is contained in:
parent
d6667e6cb6
commit
e62243beea
1 changed files with 4 additions and 1 deletions
|
@ -39,7 +39,10 @@ def profile_link(user):
|
|||
|
||||
@register.filter
|
||||
def forum_time(time):
|
||||
return u'%s %s' % (capfirst(naturalday(time)), time.strftime('%H:%M:%S'))
|
||||
try:
|
||||
return u'%s %s' % (capfirst(naturalday(time)), time.strftime('%H:%M:%S'))
|
||||
except AttributeError:
|
||||
return u''
|
||||
|
||||
@register.filter
|
||||
def forum_can_view_reports(user):
|
||||
|
|
Reference in a new issue