Migrate hide profile

This commit is contained in:
Ruud
2014-03-12 22:46:12 +01:00
parent f775c9da0b
commit e5e768c56f

View File

@@ -7,7 +7,7 @@ from couchpotato import CPLog
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.variable import getImdb
from couchpotato.core.helpers.variable import getImdb, tryInt
log = CPLog(__name__)
@@ -223,7 +223,8 @@ class Database(object):
# Update existing with order only
if exists and p.get('core'):
profile = db.get('id', exists)
profile['order'] = p.get('order')
profile['order'] = tryInt(p.get('order'))
profile['hide'] = p.get('hide') in [1, True, 'true', 'True']
db.update(profile)
profile_link[x] = profile.get('_id')