fix: mpointstat safe_get_or_create
This commit is contained in:
parent
43509aa25a
commit
039cb3108b
|
@ -207,7 +207,7 @@ def cal_mpointstat_hour(mpointId: str, year: int, month: int, day: int, hour: in
|
|||
val = translate_eval_formula(formula, year, month, day, hour)
|
||||
else:
|
||||
return
|
||||
ms, _ = MpointStat.objects.safe_get_or_create(**params)
|
||||
ms, _ = MpointStat.safe_get_or_create(**params)
|
||||
ms.val = ms.val_correct if ms.val_correct is not None else val
|
||||
if material_code == 'elec':
|
||||
val_level = get_elec_level(month, hour)
|
||||
|
|
Loading…
Reference in New Issue