From 78533570655e71d8bec67ae09588626a619c0ef3 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 25 Jul 2023 17:48:19 -0500 Subject: [PATCH] fix error when filtering on rating in saved filters --- cookbook/helper/recipe_search.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cookbook/helper/recipe_search.py b/cookbook/helper/recipe_search.py index 150945f1a..948152099 100644 --- a/cookbook/helper/recipe_search.py +++ b/cookbook/helper/recipe_search.py @@ -32,6 +32,9 @@ class RecipeSearch(): if custom_filter: self._params = {**json.loads(custom_filter.search)} self._original_params = {**(params or {})} + # json.loads casts rating as an integer, expecting string + if isinstance(self._params.get('rating', None), int): + self._params['rating'] = str(self._params['rating']) else: self._params = {**(params or {})} else: