fix: cal_enstat2 bug

This commit is contained in:
caoqianming 2023-08-23 08:45:09 +08:00
parent cd5cf00fad
commit 50714225e5
1 changed files with 3 additions and 3 deletions

View File

@ -470,11 +470,11 @@ def get_total_hour_now_and_shut_hour(enstat: EnStat):
@shared_task(base=CustomTask)
def cal_enstat2(type: str, year_s: int, month_s: int, day_s: int, cascade=True):
if type == 'day_s':
cal_enstat2('day_s', year_s, month_s, day_s)
cal_enstat2('day_s', year_s, month_s, day_s, False)
if cascade:
cal_enstat2('month_s', year_s, month_s, day_s)
cal_enstat2('month_s', year_s, month_s, day_s, False)
elif type == 'month_s':
cal_enstat2('month_s', year_s, month_s, day_s)
cal_enstat2('month_s', year_s, month_s, day_s, False)
else:
return
if type == 'month_s':