aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/utils.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-12 18:43:07 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-12 18:43:07 +0200
commit6806497c0948775a0da7cc06e49ed90fe7484d80 (patch)
tree57b454025460a8ca935869f77d7b9731ef7ac565 /pyaggr3g470r/utils.py
parentRemoved option to disable a user. (diff)
downloadnewspipe-6806497c0948775a0da7cc06e49ed90fe7484d80.tar.gz
newspipe-6806497c0948775a0da7cc06e49ed90fe7484d80.tar.bz2
newspipe-6806497c0948775a0da7cc06e49ed90fe7484d80.zip
Export of all articles in HTML pages is now working again (but not yet on Heroku).
Diffstat (limited to 'pyaggr3g470r/utils.py')
-rwxr-xr-xpyaggr3g470r/utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/pyaggr3g470r/utils.py b/pyaggr3g470r/utils.py
index 1a8a8387..6f0bab33 100755
--- a/pyaggr3g470r/utils.py
+++ b/pyaggr3g470r/utils.py
@@ -101,8 +101,7 @@ def import_opml(email, opml_file):
except:
continue
- existing_feed = [feed for feed in user.feeds if feed.link == link]
- if len(existing_feed) != 0:
+ if None != Feed.query.filter(Feed.link == link).first():
continue
try:
@@ -116,7 +115,7 @@ def import_opml(email, opml_file):
nb += 1
db.session.commit()
- return nb
+ return nb, len(subscriptions)-nb
def clean_url(url):
"""
bgstack15