Skip to content

Commit

Permalink
Date return type mixup
Browse files Browse the repository at this point in the history
  • Loading branch information
sshirokov authored and Yaroslav Shirokov committed Apr 4, 2009
1 parent b56c9e0 commit 4d09501
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/article.py
Expand Up @@ -26,9 +26,9 @@ def date(self):
from dateutil.parser import parser
from datetime import datetime
date = (self.meta.has_key('date') and parser().parse(self.meta.date)) or \
datetime.fromtimestamp(os.stat(os.path.join(settings.POST_ROOT, self.slug)).st_mtime).isoformat()
datetime.fromtimestamp(os.stat(os.path.join(settings.POST_ROOT, self.slug)).st_mtime)
if not self.meta.has_key('date') and self.meta.get('status', '*no-status*') == 'published':
self.meta.date = date
self.meta.date = date.isoformat()
self.save()
return date

Expand Down

0 comments on commit 4d09501

Please sign in to comment.