mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix creating new library using the copy structure option incorrectly setting all text type columns to be like the tags column
This commit is contained in:
commit
bca209cb4f
@ -341,7 +341,9 @@ class DB(object):
|
|||||||
if f['is_custom']]
|
if f['is_custom']]
|
||||||
for f in fmvals:
|
for f in fmvals:
|
||||||
self.create_custom_column(f['label'], f['name'],
|
self.create_custom_column(f['label'], f['name'],
|
||||||
f['datatype'], f['is_multiple'] is not None,
|
f['datatype'],
|
||||||
|
(f['is_multiple'] is not None and
|
||||||
|
len(f['is_multiple']) > 0),
|
||||||
f['is_editable'], f['display'])
|
f['is_editable'], f['display'])
|
||||||
|
|
||||||
defs = self.prefs.defaults
|
defs = self.prefs.defaults
|
||||||
|
@ -214,7 +214,8 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
fmvals = [f for f in default_prefs['field_metadata'].values() if f['is_custom']]
|
fmvals = [f for f in default_prefs['field_metadata'].values() if f['is_custom']]
|
||||||
for f in fmvals:
|
for f in fmvals:
|
||||||
self.create_custom_column(f['label'], f['name'], f['datatype'],
|
self.create_custom_column(f['label'], f['name'], f['datatype'],
|
||||||
f['is_multiple'] is not None, f['is_editable'], f['display'])
|
f['is_multiple'] is not None and len(f['is_multiple']) > 0,
|
||||||
|
f['is_editable'], f['display'])
|
||||||
self.initialize_dynamic()
|
self.initialize_dynamic()
|
||||||
|
|
||||||
def get_property(self, idx, index_is_id=False, loc=-1):
|
def get_property(self, idx, index_is_id=False, loc=-1):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user