aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-13 01:21:10 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-13 01:21:10 +0200
commit1682cb05e71c57f8b5e2627c5747c076129c0444 (patch)
tree7b9f9bd6ad01015509e9cf1b446ceaa78638b2d5
parentfixed template for /search (diff)
downloadnewspipe-1682cb05e71c57f8b5e2627c5747c076129c0444.tar.gz
newspipe-1682cb05e71c57f8b5e2627c5747c076129c0444.tar.bz2
newspipe-1682cb05e71c57f8b5e2627c5747c076129c0444.zip
Updated *
-rw-r--r--pyaggr3g470r/feedgetter.py3
-rw-r--r--pyaggr3g470r/views.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py
index c5bac3c8..5f8aa9f7 100644
--- a/pyaggr3g470r/feedgetter.py
+++ b/pyaggr3g470r/feedgetter.py
@@ -39,7 +39,8 @@ from sqlalchemy.exc import IntegrityError
import models
import conf
-#import search
+if not conf.ON_HEROKU:
+ import search
import utils
if not conf.ON_HEROKU:
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 69552108..41762d74 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -297,6 +297,10 @@ def delete(article_id=None):
if article != None and article.source.subscriber.id == g.user.id:
db.session.delete(article)
db.session.commit()
+ try:
+ fastsearch.delete_article(article.feed_id, article.id)
+ except:
+ pass
flash('Article "' + article.title + '" deleted.', 'success')
return redirect(url_for('home'))
else:
bgstack15