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
|
amountl = amount
|
||||||
date = datetime.now()
|
date = datetime.now()
|
||||||
mainController.addAmount(
|
mainController.addAmount(
|
||||||
userID, amount, year=date.year, month=date.month)
|
userID, amount, year=date.year, month=date.month, bar=True)
|
||||||
user = mainController.getUser(userID)
|
user = mainController.getUser(userID)
|
||||||
geruecht = user.getGeruecht(year=date.year)
|
geruecht = user.getGeruecht(year=date.year)
|
||||||
month = geruecht.getMonth(month=date.month)
|
month = geruecht.getMonth(month=date.month)
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Base:
|
||||||
user.updateData({'locked': False})
|
user.updateData({'locked': False})
|
||||||
db.updateUser(user)
|
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(
|
debug.info("add amount {{ {} }} to user {{ {} }} no month {{ {} }}, year {{ {} }}".format(
|
||||||
amount, username, month, year))
|
amount, username, month, year))
|
||||||
user = self.getUser(username)
|
user = self.getUser(username)
|
||||||
|
@ -41,6 +41,7 @@ class Base:
|
||||||
debug.debug("user is not locked {{ {} }} or is finanzer execution {{ {} }}".format(
|
debug.debug("user is not locked {{ {} }} or is finanzer execution {{ {} }}".format(
|
||||||
user.locked, finanzer))
|
user.locked, finanzer))
|
||||||
user.addAmount(amount, year=year, month=month)
|
user.addAmount(amount, year=year, month=month)
|
||||||
|
if bar:
|
||||||
user.last_seen = datetime.now()
|
user.last_seen = datetime.now()
|
||||||
db.updateLastSeen(user, user.last_seen)
|
db.updateLastSeen(user, user.last_seen)
|
||||||
creditLists = user.updateGeruecht()
|
creditLists = user.updateGeruecht()
|
||||||
|
|
Loading…
Reference in New Issue