fix: cal_enstat2 bug

This commit is contained in:
caoqianming 2023-08-23 08:48:37 +08:00
parent 50714225e5
commit 18942d57c9
1 changed files with 7 additions and 7 deletions

View File

@ -469,9 +469,9 @@ 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 cascade:
if type == '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, False)
elif type == 'month_s':
cal_enstat2('month_s', year_s, month_s, day_s, False)