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 @@ @@ -108,7 +112,7 @@ export default { }).catch((r, e) => { StandardToasts.makeStandardToast(StandardToasts.FAIL_UPDATE) }) - } + }, }, } diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index afb90226f..12919e80f 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -440,7 +440,6 @@ :initial_selection="settings.shopping_share" label="username" :multiple="true" - :allow_create="false" style="flex-grow: 1; flex-shrink: 1; flex-basis: 0" :placeholder="$t('User')" /> diff --git a/vue/src/components/GenericMultiselect.vue b/vue/src/components/GenericMultiselect.vue index 977a4c01d..a5c3a0e7d 100644 --- a/vue/src/components/GenericMultiselect.vue +++ b/vue/src/components/GenericMultiselect.vue @@ -19,6 +19,7 @@ @search-change="search" @input="selectionChanged" @tag="addNew" + @open="selectOpened()" > @@ -26,7 +27,7 @@