fixed bug, dass auch der finanzer schulden hinzufügen kann ohne dass last_seen aktualisiert wird
This commit is contained in:
parent
f4ab34c298
commit
c7e1c981e6
|
@ -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)
|
||||
|
|
|
@ -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,6 +41,7 @@ class Base:
|
|||
debug.debug("user is not locked {{ {} }} or is finanzer execution {{ {} }}".format(
|
||||
user.locked, finanzer))
|
||||
user.addAmount(amount, year=year, month=month)
|
||||
if bar:
|
||||
user.last_seen = datetime.now()
|
||||
db.updateLastSeen(user, user.last_seen)
|
||||
creditLists = user.updateGeruecht()
|
||||
|
|
Loading…
Reference in New Issue