fix: translate_eval_formula enm_lhxs的处理

This commit is contained in:
caoqianming 2024-05-07 11:09:19 +08:00
parent ce38c3e338
commit 52fc0c6bd3
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ def translate_eval_formula(exp_str: str, year: int, month: int, day: int, hour:
matches = re.findall(pattern, exp_str)
for match in matches:
if match in ['enm_lhxs']:
exp_str = exp_str.replace(f"{{{match}}}", get_sysconfig(f'enm.{match}'))
exp_str = exp_str.replace(f"{{{match}}}", str(get_sysconfig(f'enm.{match}')))
else:
mpst = MpointStat.objects.filter(Q(mpoint__id=match) | Q(mpoint__name=match) | Q(mpoint__code=match), type="hour", year=year, month=month, day=day, hour=hour).first()
if mpst: