From 8b15521dcc5cad2bcf9197c683be95611b385448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 26 Jun 2013 10:07:38 +0200 Subject: [PATCH] do not fail on wrong dates --- tabellio/documents/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tabellio/documents/common.py b/tabellio/documents/common.py index b36c63c..ac72a34 100644 --- a/tabellio/documents/common.py +++ b/tabellio/documents/common.py @@ -7,7 +7,10 @@ import tabellio.config.utils class BasePublication(object): @property def date_str(self): - return self.date.strftime('%d/%m/%Y') + try: + return self.date.strftime('%d/%m/%Y') + except AttributeError: + return '' def get_authors_as_string(self): if not self.authors: