remove empty public lists
This commit is contained in:
parent
ca35c413fe
commit
a495fc398d
2 changed files with 9 additions and 3 deletions
|
@ -90,11 +90,9 @@ USER_AGENT = 'OpenMediaLibrary/%s' % VERSION
|
|||
DEBUG_HTTP = server.get('debug_http', False)
|
||||
DEBUG_API = server.get('debug_api', False)
|
||||
|
||||
DB_VERSION = 13
|
||||
|
||||
|
||||
FULLTEXT_SUPPORT = fulltext.platform_supported()
|
||||
|
||||
if not FULLTEXT_SUPPORT:
|
||||
config['itemKeys'] = [k for k in config['itemKeys'] if k['id'] != 'fulltext']
|
||||
|
||||
DB_VERSION = 14
|
||||
|
|
|
@ -617,3 +617,11 @@ def migrate_13():
|
|||
if revision > -1:
|
||||
settings.server['revision'] = revision
|
||||
return 13
|
||||
|
||||
def migrate_14():
|
||||
from user.models import List
|
||||
with db.session():
|
||||
l = List.get(':Public')
|
||||
if l and not len(l.items):
|
||||
l.remove()
|
||||
return 14
|
||||
|
|
Loading…
Reference in a new issue