diff --git a/cookbook/models.py b/cookbook/models.py index 1456fb825..67679a897 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -63,7 +63,7 @@ class TreeManager(MP_NodeManager): def get_or_create(self, *args, **kwargs): kwargs['name'] = kwargs['name'].strip() try: - return self.get(name__exact=kwargs['name'], space=kwargs['space']), False + return self.get(name__iexact=kwargs['name'], space=kwargs['space']), False except self.model.DoesNotExist: with scopes_disabled(): try: diff --git a/cookbook/serializer.py b/cookbook/serializer.py index d9da5ae70..9d1c76968 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -302,7 +302,7 @@ class KeywordSerializer(UniqueFieldsMixin, ExtendedRecipeMixin): # duplicate names might be routed to create name = validated_data.pop('name').strip() space = validated_data.pop('space', self.context['request'].space) - obj, created = Keyword.objects.get_or_create(name__iexact=name, space=space, defaults=validated_data) + obj, created = Keyword.objects.get_or_create(name=name, space=space, defaults=validated_data) return obj class Meta: @@ -438,7 +438,7 @@ class FoodSerializer(UniqueFieldsMixin, WritableNestedModelSerializer, ExtendedR else: validated_data['onhand_users'] = list(set(onhand_users) - set(shared_users)) - obj, created = Food.objects.get_or_create(name__iexact=name, space=space, defaults=validated_data) + obj, created = Food.objects.get_or_create(name=name, space=space, defaults=validated_data) return obj def update(self, instance, validated_data): diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue index e7682f714..8868d5e86 100644 --- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue +++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue @@ -1,6 +1,6 @@ @@ -739,48 +574,40 @@ and don't contain - anyall of the following books: + anyall of the following books: {{ k.items.flatMap((x) => x.name).join(", ") }} -
+
- and you can make right now (based on the on hand flag)
+ and you can make right now (based on the on hand flag)
- and contain anyall of the following units: + and contain anyall of the following units: {{ search.search_units.flatMap((x) => x.name).join(", ") }}
+ >
- and have a rating or - equal to {{ search.search_rating }}
+ and have a rating or + equal to {{ search.search_rating }}
- and have been last cooked + and have been last cooked {{ search.lastcooked }}
+ >
- and have been cooked or - equal to{{ search.timescooked }} times
+ and have been cooked or + equal to{{ search.timescooked }} times
order by {{ search.sort_order.flatMap((x) => x.text).join(", ") }} -
+
@@ -793,8 +620,7 @@
- +
- {{ $t("Page") }} {{ search.pagination_page }}/{{ - Math.ceil(pagination_count / ui.page_size) - }} + {{ $t("Page") }} {{ search.pagination_page }}/{{ Math.ceil(pagination_count / ui.page_size) }} {{ $t("Reset") }}
@@ -819,24 +643,18 @@
-
+
- +
- +
@@ -847,17 +665,17 @@