Fix loan list for nameless books

This commit is contained in:
Florian Bach 2023-02-20 17:14:23 +01:00
parent 93d732f0d6
commit a9519fbd20
1 changed files with 5 additions and 1 deletions

View File

@ -1416,7 +1416,11 @@ class RentedBooksDialog(QDialog):
info = "(" + self.td_format(timestamp - currenttime) + " remaining)"
item = QListWidgetItem(book["book_name"] + " " + info)
book_name = book["book_name"]
if book_name is None:
book_name = "(unknown book)"
item = QListWidgetItem(book_name + " " + info)
item.setData(QtCore.Qt.UserRole, book["loanID"])
self.listy.addItem(item)