mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:12:35 +02:00
Fix a regression in calibre 2.0 that caused setting the value of a custom number column to zero via the book list to clear the field instead. Fixes #1363076 [The number zero doesn't appear](https://bugs.launchpad.net/calibre/+bug/1363076)
This commit is contained in:
parent
8f18290228
commit
ed8459397a
1 changed files with 4 additions and 1 deletions
|
|
@ -979,7 +979,10 @@ def set_custom_column_data(self, row, colhead, value):
|
|||
val = 0 if val < 0 else 5 if val > 5 else val
|
||||
val *= 2
|
||||
elif typ in ('int', 'float'):
|
||||
val = unicode(value or '').strip()
|
||||
if value == 0:
|
||||
val = '0'
|
||||
else:
|
||||
val = unicode(value or '').strip()
|
||||
if not val:
|
||||
val = None
|
||||
elif typ == 'datetime':
|
||||
|
|
|
|||
Loading…
Reference in a new issue