diff --git a/cookbook/helper/HelperFunctions.py b/cookbook/helper/HelperFunctions.py index e2971c2e..94f46ee8 100644 --- a/cookbook/helper/HelperFunctions.py +++ b/cookbook/helper/HelperFunctions.py @@ -7,7 +7,7 @@ class Round(Func): def str2bool(v): - if type(v) == bool or v is None: + if isinstance(v, bool) or v is None: return v else: return v.lower() in ("yes", "true", "1") diff --git a/cookbook/helper/recipe_search.py b/cookbook/helper/recipe_search.py index 2b70808e..e3b0b506 100644 --- a/cookbook/helper/recipe_search.py +++ b/cookbook/helper/recipe_search.py @@ -309,7 +309,7 @@ class RecipeSearch(): def _favorite_recipes(self, times_cooked=None): if self._sort_includes('favorite') or times_cooked: - less_than = '-' in (times_cooked or []) and not self._sort_includes('-favorite') + less_than = '-' in (str(times_cooked) or []) and not self._sort_includes('-favorite') if less_than: default = 1000 else: diff --git a/cookbook/templates/system.html b/cookbook/templates/system.html index 18e56fa7..90c2eabb 100644 --- a/cookbook/templates/system.html +++ b/cookbook/templates/system.html @@ -84,21 +84,47 @@ {% endif %}