some fixes

- improved handling of 'empty' config paramaters
- improved handling of bf recipes where a step has no name
This commit is contained in:
avollkopf 2021-07-13 07:07:55 +02:00
parent c8c6491467
commit cad063e6a3
2 changed files with 8 additions and 2 deletions

View file

@ -35,7 +35,7 @@ class ConfigController:
def get(self, name, default=None):
self.logger.debug("GET CONFIG VALUE %s (default %s)" % (name, default))
if name in self.cache and self.cache[name].value is not None:
if name in self.cache and self.cache[name].value is not None and self.cache[name].value != "":
return self.cache[name].value
else:
return default

View file

@ -438,7 +438,13 @@ class UploadController:
MashIn_Flag = True
step_kettle = self.id
for step in mash_steps:
step_name = step['name']
try:
step_name = step['name']
if step_name == "":
step_name = "MashStep"
except:
step_name = "MashStep"
step_timer = str(int(step['stepTime']))
if self.TEMP_UNIT == "C":