Fix site deletion errors on startup

This commit is contained in:
shortcutme 2016-11-07 22:38:01 +01:00
parent efbd485f5f
commit 8f3dfd7435

View file

@ -50,7 +50,7 @@ class SiteManager(object):
for row in ContentDb.getContentDb().execute("SELECT * FROM site"):
if row["address"] not in self.sites:
self.log.info("Deleting orphan site from content.db: %s" % row["address"])
ContentDb.getContentDb().deleteSite(row["address"])
ContentDb.getContentDb().execute("DELETE FROM site WHERE ?", {"address": row["address"]})
if added:
self.log.debug("SiteManager added %s sites" % added)