diff --git a/app/models/comment.py b/app/models/comment.py index 910597a..ab80933 100644 --- a/app/models/comment.py +++ b/app/models/comment.py @@ -12,6 +12,7 @@ from app.services.database import get_db class Comment(Model): url = CharField() + created = DateTimeField() published = DateTimeField() author_name = CharField() author_email = CharField(default='') diff --git a/tools/pecosys2stacosys.py b/tools/pecosys2stacosys.py index 69f5c27..8610f98 100644 --- a/tools/pecosys2stacosys.py +++ b/tools/pecosys2stacosys.py @@ -61,7 +61,6 @@ def convert_comment(db, site, filename): if 'site' in d: comment.author_site = d['site'] if 'url' in d: - logger.info(d['url'][:6]) if d['url'][:7] == 'http://': comment.url = d['url'][7:] elif d['url'][:8] == 'https://': @@ -69,6 +68,7 @@ def convert_comment(db, site, filename): # else: # comment.url = d['article'] if 'date' in d: + comment.created = d['date'] comment.published = d['date'] comment.save()