diff options
Diffstat (limited to 'pyaggr3g470r/utils.py')
-rwxr-xr-x | pyaggr3g470r/utils.py | 5 |
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): """ |