update search page to show no resutl found message and tell how to search
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user