This commit is contained in:
Kovid Goyal 2020-07-21 22:15:17 +05:30
commit d572330733
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -95,9 +95,9 @@ def _add_newbook_tag(mi):
def _add_default_custom_column_values(mi, fm):
cols = fm.custom_field_metadata(include_composites=False)
for cc,col in iteritems(cols):
dv = col['display'].get('default_value', '')
dv = col['display'].get('default_value', None)
try:
if dv:
if dv is not None:
if not mi.get_user_metadata(cc, make_copy=False):
mi.set_user_metadata(cc, col)
dt = col['datatype']