diff --git a/cookbook/serializer.py b/cookbook/serializer.py index 118fdd941..124a47bab 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -234,7 +234,7 @@ class MealTypeSerializer(SpacedModelSerializer, WritableNestedModelSerializer): class UserPreferenceSerializer(WritableNestedModelSerializer): food_inherit_default = serializers.SerializerMethodField('get_food_inherit_defaults') - plan_share = UserNameSerializer(many=True, allow_null=True, required=False, read_only=True) + plan_share = UserNameSerializer(many=True, allow_null=True, required=False) shopping_share = UserNameSerializer(many=True, allow_null=True, required=False) food_children_exist = serializers.SerializerMethodField('get_food_children_exist') diff --git a/vue/src/apps/RecipeEditView/RecipeEditView.vue b/vue/src/apps/RecipeEditView/RecipeEditView.vue index e9e98adf5..da2558e30 100644 --- a/vue/src/apps/RecipeEditView/RecipeEditView.vue +++ b/vue/src/apps/RecipeEditView/RecipeEditView.vue @@ -1136,7 +1136,7 @@ export default { if (ing.trim() !== "") { this.genericPostAPI("api_ingredient_from_string", {text: ing}).then((result) => { let unit = null - if (result.data.unit !== "") { + if (result.data.unit !== "" && result.data.unit !== null) { unit = {name: result.data.unit} } this.recipe.steps[step].ingredients.splice(order, 0, {