Setup property index with database module
This commit is contained in:
1 parent
69819460f3
commit
a566b4f428
1 file changed
+1
-9
@@ -71,15 +71,7 @@ class Settings(object):
|
|||||||
self.connectEvents()
|
self.connectEvents()
|
||||||
|
|
||||||
def databaseSetup(self):
|
def databaseSetup(self):
|
||||||
from couchpotato import get_db
|
fireEvent('database.setup_index', 'property', PropertyIndex)
|
||||||
|
|
||||||
db = get_db()
|
|
||||||
|
|
||||||
try:
|
|
||||||
db.add_index(PropertyIndex(db.path, 'property'))
|
|
||||||
except:
|
|
||||||
self.log.debug('Index for properties already exists')
|
|
||||||
db.edit_index(PropertyIndex(db.path, 'property'))
|
|
||||||
|
|
||||||
def parser(self):
|
def parser(self):
|
||||||
return self.p
|
return self.p
|
||||||
|
|||||||
Reference in new issue
Block a user