aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-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