From 7b75e279b065b46610a490907109c952c78929b1 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Tue, 26 Jan 2021 18:21:45 +0100 Subject: [PATCH] shopping list ui somewhat bearable --- cookbook/serializer.py | 2 +- cookbook/templates/shopping_list.html | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cookbook/serializer.py b/cookbook/serializer.py index 7e6b84237..5f34ecbdf 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -342,7 +342,7 @@ class ShoppingListRecipeSerializer(serializers.ModelSerializer): class ShoppingListEntrySerializer(WritableNestedModelSerializer): food = FoodSerializer(allow_null=True) - unit = UnitSerializer(allow_null=True) + unit = UnitSerializer(allow_null=True, required=False) amount = CustomDecimalField() class Meta: diff --git a/cookbook/templates/shopping_list.html b/cookbook/templates/shopping_list.html index a1e855ccd..e6a168e5d 100644 --- a/cookbook/templates/shopping_list.html +++ b/cookbook/templates/shopping_list.html @@ -109,14 +109,14 @@ - +