Browse Source

修改模板因子条件

gushoubang 7 months ago
parent
commit
c04f079c5c
1 changed files with 4 additions and 1 deletions
  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"],