update code, switch to loguru
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from .sources.Ui_main_userData import Ui_MainWindow
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
from src import log
|
||||
from src.logic import Database
|
||||
from src.schemas import User
|
||||
from .extendLoan import ExtendLoan
|
||||
from src.utils import stringToDate, Icon
|
||||
from src.utils import debugMessage as dbg
|
||||
|
||||
TABLETOFIELDTRANSLATE = {
|
||||
"Titel": "title",
|
||||
@@ -95,7 +95,6 @@ class UserUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
limiter = self.searchbox.text().lower()
|
||||
searchfield = self.searchfilter.currentText()
|
||||
searchfield = TABLETOFIELDTRANSLATE[searchfield]
|
||||
# dbg(limiter=limiter, search=searchfield)
|
||||
|
||||
self.UserMediaTable.setRowCount(0)
|
||||
for loan in self.userMedia:
|
||||
@@ -166,7 +165,7 @@ class UserUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
continue
|
||||
elif mode == "overdue":
|
||||
# book not returned and todays date is greater than todate
|
||||
dbg(book=book)
|
||||
log.debug("Book: {}".format(book))
|
||||
if book.returned_date is not None:
|
||||
continue
|
||||
# if todate is greater than current date, continue
|
||||
|
||||
Reference in New Issue
Block a user