This commit is contained in:
Kovid Goyal 2011-06-20 15:54:32 -06:00
parent 8e22f5c432
commit 15d8272efe

View File

@ -201,12 +201,10 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
dbprefs = DBPrefs(self)
for key in default_prefs:
# be sure that prefs not to be copied are listed below
if key in ['news_to_be_synced']:
if key in frozenset(['news_to_be_synced']):
continue
try:
dbprefs[key] = default_prefs[key]
except:
pass # ignore options that don't exist anymore
if 'field_metadata' in default_prefs:
fmvals = [f for f in default_prefs['field_metadata'].values() if f['is_custom']]
for f in fmvals:
self.create_custom_column(f['label'], f['name'], f['datatype'],