diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-11-10 23:08:36 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-11-10 23:08:36 +0100 |
commit | 13dc4d5c9dc7b6513aa9844ef4f1e56c12758b5a (patch) | |
tree | 7b20aeab304759116eb33e4bbfa387e4152b3228 | |
parent | It is now possible to configure the refresh interval of feeds (in minutes). (diff) | |
download | newspipe-13dc4d5c9dc7b6513aa9844ef4f1e56c12758b5a.tar.gz newspipe-13dc4d5c9dc7b6513aa9844ef4f1e56c12758b5a.tar.bz2 newspipe-13dc4d5c9dc7b6513aa9844ef4f1e56c12758b5a.zip |
bug fix
-rwxr-xr-x | src/web/lib/misc_utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
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"], |