fix
This commit is contained in:
parent
96dd773e5d
commit
d82397477f
4
api.py
4
api.py
@ -352,8 +352,6 @@ def add_time(it: Add_time):
|
||||
db['id'][id]['bal'] += amount
|
||||
# Статистика
|
||||
date = datetime.today().strftime('%Y-%m-%d')
|
||||
if date not in stat:
|
||||
stat_run(0)
|
||||
# Для пользователя
|
||||
t2c_date = db['id'][id]['time2cdm'][1]
|
||||
if t2c_date != date:
|
||||
@ -364,6 +362,8 @@ def add_time(it: Add_time):
|
||||
write(db)
|
||||
# Глобально
|
||||
stat = read('stat.json')
|
||||
if date not in stat:
|
||||
stat_run(0)
|
||||
stat[date]['time2cdm'] += amount
|
||||
write(stat, 'stat.json')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user