mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-25 16:38:36 +01:00
fix if no description is given in fermenterrecipe
This commit is contained in:
parent
d8ba8c0ac5
commit
cdc2ee83a3
2 changed files with 9 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
__version__ = "4.0.3.a1"
|
__version__ = "4.0.3.a2"
|
||||||
|
|
|
@ -562,11 +562,17 @@ class FermentationController:
|
||||||
item["props"]["Sensor"] = fermenter.sensor
|
item["props"]["Sensor"] = fermenter.sensor
|
||||||
|
|
||||||
list(map(lambda item: add_runtime_data(item), data.get("steps")))
|
list(map(lambda item: add_runtime_data(item), data.get("steps")))
|
||||||
fermenter.description = data['basic']['desc']
|
try:
|
||||||
|
fermenter.description = data['basic'].get("desc")
|
||||||
|
except:
|
||||||
|
fermenter.description = "No Description"
|
||||||
if name is not None:
|
if name is not None:
|
||||||
fermenter.brewname = name
|
fermenter.brewname = name
|
||||||
else:
|
else:
|
||||||
fermenter.brewname = data['basic']['name']
|
try:
|
||||||
|
fermenter.brewname = data['basic'].get("name")
|
||||||
|
except:
|
||||||
|
fermenter.brewname = "Fermentation"
|
||||||
await self.update(fermenter)
|
await self.update(fermenter)
|
||||||
fermenter.steps=[]
|
fermenter.steps=[]
|
||||||
for item in data.get("steps"):
|
for item in data.get("steps"):
|
||||||
|
|
Loading…
Reference in a new issue