update search page to show no resutl found message and tell how to search

This commit is contained in:
2025-07-03 09:58:11 +02:00
parent 290395d38d
commit 2e3845b568
3 changed files with 430 additions and 287 deletions

View File

@@ -143,6 +143,8 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
self.stackedWidget_4.setCurrentIndex(1)
def search_book(self):
self.no_result.setText("")
self.book_search_result.setRowCount(0)
signature = self.search_by_signature.text()
title = self.search_by_title.text()
@@ -151,9 +153,11 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
"title": title if title != "" else None,
}
params = {key: value for key, value in params.items() if value is not None}
log.debug(params)
log.info(params)
retdata = self.db.searchBook(params)
if retdata is None:
log.info(retdata)
if retdata == [] or retdata is None:
self.no_result.setText("Keine Ergebnisse gefunden")
return
for book in retdata:
log.debug(book)