diff --git a/apps/enm/services.py b/apps/enm/services.py index 8295993b..0f436ac9 100644 --- a/apps/enm/services.py +++ b/apps/enm/services.py @@ -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: