Skip to content

Commit

Permalink
Fix searching with broken sites
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Apr 19, 2016
1 parent 5f55d8a commit 6f8c24e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/Newsfeed/NewsfeedPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ def actionFeedSearch(self, to, search):
if not site.storage.has_db:
continue

db = site.storage.getDb()
feeds = db.schema.get("feeds")
if site.storage.db: # Database loaded
feeds = site.storage.db.schema.get("feeds")
else:
try:
feeds = site.storage.loadJson("dbschema.json").get("feeds")
except:
continue

if not feeds:
continue
Expand Down

0 comments on commit 6f8c24e

Please sign in to comment.