浏览代码

test

tags/3.1_alpha
swimIan 8 年前
父节点
当前提交
85f0c6cbff
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. +3
    -4
      modules/recipe_import/beerxml.py

+ 3
- 4
modules/recipe_import/beerxml.py 查看文件

@@ -51,8 +51,7 @@ class BeerXMLImport(FlaskView):
name = self.getRecipeName(id) name = self.getRecipeName(id)
self.api.set_config_parameter("brew_name", name) self.api.set_config_parameter("brew_name", name)
boil_time = self.getBoilTime(id) boil_time = self.getBoilTime(id)
mashin_temp = self.getMashinTemp(id)
mashinstep_type = cbpi.get_config_parameter("step_mashin", "MashInStep")
mashinstep_type = cbpi.get_config_parameter("step_mashin", "MashInStep")
mashstep_type = cbpi.get_config_parameter("step_mash", "MashStep") mashstep_type = cbpi.get_config_parameter("step_mash", "MashStep")
mash_kettle = cbpi.get_config_parameter("step_mash_kettle", None) mash_kettle = cbpi.get_config_parameter("step_mash_kettle", None)


@@ -66,8 +65,8 @@ class BeerXMLImport(FlaskView):


try: try:


## Add Mashin step
Step.insert(**{"name": "MashIn", "type": mashinstep_type, "config": {"kettle": mash_kettle, "temp": mashin_temp}})
## Add Mashin step
Step.insert(**{"name": "MashIn", "type": mashinstep_type, "config": {"kettle": mash_kettle, "temp": mashin_temp}})
for row in steps: for row in steps:
Step.insert(**{"name": row.get("name"), "type": mashstep_type, "config": {"kettle": mash_kettle, "temp": float(row.get("temp")), "timer": row.get("timer")}}) Step.insert(**{"name": row.get("name"), "type": mashstep_type, "config": {"kettle": mash_kettle, "temp": float(row.get("temp")), "timer": row.get("timer")}})
Step.insert(**{"name": "ChilStep", "type": "ChilStep", "config": {"timer": 15}}) Step.insert(**{"name": "ChilStep", "type": "ChilStep", "config": {"timer": 15}})


正在加载...
取消
保存