mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-24 17:03:25 +02:00
Port use of QVariant::isNull
This commit is contained in:
parent
8487dc0aae
commit
202bcb2e3b
1 changed files with 3 additions and 3 deletions
|
|
@ -984,7 +984,7 @@ def set_custom_column_data(self, row, colhead, value):
|
|||
val = None
|
||||
elif typ == 'datetime':
|
||||
val = value
|
||||
if val.isNull():
|
||||
if val is None:
|
||||
val = None
|
||||
else:
|
||||
if not val.isValid():
|
||||
|
|
@ -1087,11 +1087,11 @@ def _set_data(self, index, value):
|
|||
books_to_refresh |= self.db.set_series(id, val,
|
||||
allow_case_change=True)
|
||||
elif column == 'timestamp':
|
||||
if val.isNull() or not val.isValid():
|
||||
if val is None or not val.isValid():
|
||||
return False
|
||||
self.db.set_timestamp(id, qt_to_dt(val, as_utc=False))
|
||||
elif column == 'pubdate':
|
||||
if val.isNull() or not val.isValid():
|
||||
if val is None or not val.isValid():
|
||||
return False
|
||||
self.db.set_pubdate(id, qt_to_dt(val, as_utc=False))
|
||||
elif column == 'languages':
|
||||
|
|
|
|||
Loading…
Reference in a new issue