fix: month_st 需提前返回

This commit is contained in:
caoqianming 2024-05-16 14:18:12 +08:00
parent 9e15b34ed7
commit e81cfbe10d
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s,
enstat, _ = EnStat.objects.get_or_create( enstat, _ = EnStat.objects.get_or_create(
type="day_s", mgroup=mgroup, year_s=year_s, month_s=month_s, day_s=day_s, defaults={"type": "day_s", "mgroup": mgroup, "year_s": year_s, "month_s": month_s, "day_s": day_s} type="day_s", mgroup=mgroup, year_s=year_s, month_s=month_s, day_s=day_s, defaults={"type": "day_s", "mgroup": mgroup, "year_s": year_s, "month_s": month_s, "day_s": day_s}
) )
elif type == "month_st" and team: elif type == "month_st":
enstat, _ = EnStat.objects.get_or_create( enstat, _ = EnStat.objects.get_or_create(
type="month_st", mgroup=mgroup, team=team, year_s=year_s, month_s=month_s, defaults={"type": "month_st", "mgroup": mgroup, "year_s": year_s, "month_s": month_s, "team": team} type="month_st", mgroup=mgroup, team=team, year_s=year_s, month_s=month_s, defaults={"type": "month_st", "mgroup": mgroup, "year_s": year_s, "month_s": month_s, "team": team}
) )