diff --git a/geruecht/baruser/routes.py b/geruecht/baruser/routes.py index d078bc6..484cf4f 100644 --- a/geruecht/baruser/routes.py +++ b/geruecht/baruser/routes.py @@ -77,7 +77,7 @@ def _baradd(**kwargs): amountl = amount date = datetime.now() mainController.addAmount( - userID, amount, year=date.year, month=date.month) + userID, amount, year=date.year, month=date.month, bar=True) user = mainController.getUser(userID) geruecht = user.getGeruecht(year=date.year) month = geruecht.getMonth(month=date.month) diff --git a/geruecht/controller/mainController/mainCreditListController.py b/geruecht/controller/mainController/mainCreditListController.py index 844206b..7e6f19f 100644 --- a/geruecht/controller/mainController/mainCreditListController.py +++ b/geruecht/controller/mainController/mainCreditListController.py @@ -29,7 +29,7 @@ class Base: user.updateData({'locked': False}) db.updateUser(user) - def addAmount(self, username, amount, year, month, finanzer=False): + def addAmount(self, username, amount, year, month, finanzer=False, bar=False): debug.info("add amount {{ {} }} to user {{ {} }} no month {{ {} }}, year {{ {} }}".format( amount, username, month, year)) user = self.getUser(username) @@ -41,8 +41,9 @@ class Base: debug.debug("user is not locked {{ {} }} or is finanzer execution {{ {} }}".format( user.locked, finanzer)) user.addAmount(amount, year=year, month=month) - user.last_seen = datetime.now() - db.updateLastSeen(user, user.last_seen) + if bar: + user.last_seen = datetime.now() + db.updateLastSeen(user, user.last_seen) creditLists = user.updateGeruecht() debug.debug("creditList is {{ {} }}".format(creditLists)) for creditList in creditLists: