瀏覽代碼

修改模板因子条件

gushoubang 8 月之前
父節點
當前提交
c04f079c5c
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app.py

+ 4 - 1
app.py

@@ -476,8 +476,11 @@ def jsonResToDict(json_res):
         conditionObj = json.loads(conditionInfo)
 
         defaultValue = '0'
+        default = 'lt'
         if "value" in factor:
             defaultValue = str(factor["value"])
+        if "condition" in factor:
+            default = factor["condition"]
         # if defaultValue == '':
         #     defaultValue = '0'
 
@@ -487,7 +490,7 @@ def jsonResToDict(json_res):
             "bsm": factorBsm,
             "conditionInfo": {
                 "spatial_type": conditionObj["spatial_type"],
-                "default": factor["condition"],
+                "default": default,
                 "hasValue": conditionObj["hasValue"],
                 "defaultValue": defaultValue,
                 "unit": conditionObj["unit"],