fix if no description is given in fermenterrecipe

This commit is contained in:
avollkopf 2022-03-15 21:15:38 +01:00
parent d8ba8c0ac5
commit cdc2ee83a3
2 changed files with 9 additions and 3 deletions

View file

@ -1 +1 @@
__version__ = "4.0.3.a1"
__version__ = "4.0.3.a2"

View file

@ -562,11 +562,17 @@ class FermentationController:
item["props"]["Sensor"] = fermenter.sensor
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:
fermenter.brewname = name
else:
fermenter.brewname = data['basic']['name']
try:
fermenter.brewname = data['basic'].get("name")
except:
fermenter.brewname = "Fermentation"
await self.update(fermenter)
fermenter.steps=[]
for item in data.get("steps"):