From 13dc4d5c9dc7b6513aa9844ef4f1e56c12758b5a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 10 Nov 2016 23:08:36 +0100 Subject: bug fix --- src/web/lib/misc_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/web/lib') diff --git a/src/web/lib/misc_utils.py b/src/web/lib/misc_utils.py index 1359c798..6a0e00ec 100755 --- a/src/web/lib/misc_utils.py +++ b/src/web/lib/misc_utils.py @@ -182,7 +182,7 @@ def import_json(email, json_content): Import an account from a JSON file. """ user = User.query.filter(User.email == email).first() - json_account = json.loads(json_content) + json_account = json.loads(json_content.decode("utf-8")) nb_feeds, nb_articles = 0, 0 # Create feeds: for feed in json_account["result"]: @@ -208,7 +208,8 @@ def import_json(email, json_content): if None == Article.query.filter(Article.user_id == user.id, Article.feed_id == user_feed.id, Article.link == article["link"]).first(): - new_article = Article(link=article["link"], + new_article = Article(entry_id=article["link"], + link=article["link"], title=article["title"], content=article["content"], readed=article["readed"], -- cgit