Handle the case when the time specification of a comment is incomplete, during generation of document feeds.

- Legacy-Id: 1733
This commit is contained in:
Henrik Levkowetz 2009-10-19 09:10:22 +00:00
parent 8b6536f32e
commit 5386853dd2

View file

@ -39,7 +39,7 @@ class DocumentComments(Feed):
return obj.public_comments().order_by("-date","-id")
def item_pubdate(self, item):
time = datetime.time(*[int(t) for t in item.time.split(":")])
time = datetime.time(*[(t and int(t) or 0) for t in item.time.split(":")])
return datetime.datetime.combine(item.date, time)
def item_author_name(self, item):