diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-04-04 23:24:54 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-04-04 23:24:54 +0200 |
commit | ef09843b60ee565d270cf9575a9cfb420dcf2a0f (patch) | |
tree | 22fc76776fa0e8ccf407e289a176268123ba294d /src/lib | |
parent | Typo. (diff) | |
download | newspipe-ef09843b60ee565d270cf9575a9cfb420dcf2a0f.tar.gz newspipe-ef09843b60ee565d270cf9575a9cfb420dcf2a0f.tar.bz2 newspipe-ef09843b60ee565d270cf9575a9cfb420dcf2a0f.zip |
Removed email field.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/data.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/data.py b/src/lib/data.py index 0474888f..21eb35e0 100644 --- a/src/lib/data.py +++ b/src/lib/data.py @@ -41,11 +41,11 @@ from web.models.tag import BookmarkTag from web.controllers import BookmarkController, BookmarkTagController -def import_opml(email, opml_content): +def import_opml(nickname, opml_content): """ Import new feeds from an OPML file. """ - user = User.query.filter(User.email == email).first() + user = User.query.filter(User.nickname == nickname).first() try: subscriptions = opml.from_string(opml_content) except: @@ -89,11 +89,11 @@ def import_opml(email, opml_content): return nb -def import_json(email, json_content): +def import_json(nickname, json_content): """ Import an account from a JSON file. """ - user = User.query.filter(User.email == email).first() + user = User.query.filter(User.nickname == nickname).first() json_account = json.loads(json_content.decode("utf-8")) nb_feeds, nb_articles = 0, 0 # Create feeds: |