diff --git a/cookbook/views/api.py b/cookbook/views/api.py index d1e88568c..3719c1e69 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -600,11 +600,11 @@ class IngredientViewSet(viewsets.ModelViewSet): def get_queryset(self): queryset = self.queryset.filter(step__recipe__space=self.request.space) food = self.request.query_params.get('food', None) - if food and re.match(r'^([1-9])+$', food): + if food and re.match(r'^(\d)+$', food): queryset = queryset.filter(food_id=food) unit = self.request.query_params.get('unit', None) - if unit and re.match(r'^([1-9])+$', unit): + if unit and re.match(r'^(\d)+$', unit): queryset = queryset.filter(unit_id=unit) return queryset diff --git a/vue/src/apps/IngredientEditorView/IngredientEditorView.vue b/vue/src/apps/IngredientEditorView/IngredientEditorView.vue index 3a3ab2ba0..254b82ee6 100644 --- a/vue/src/apps/IngredientEditorView/IngredientEditorView.vue +++ b/vue/src/apps/IngredientEditorView/IngredientEditorView.vue @@ -29,16 +29,20 @@