Merge pull request #2968 from smilerz/keywords_not_required

change Recipe API to make keywords an optional field
This commit is contained in:
vabene1111 2024-02-26 08:01:25 +01:00 committed by GitHub
commit 95fdf893f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -904,7 +904,7 @@ class RecipeSerializer(RecipeBaseSerializer):
nutrition = NutritionInformationSerializer(allow_null=True, required=False) nutrition = NutritionInformationSerializer(allow_null=True, required=False)
properties = PropertySerializer(many=True, required=False) properties = PropertySerializer(many=True, required=False)
steps = StepSerializer(many=True) steps = StepSerializer(many=True)
keywords = KeywordSerializer(many=True) keywords = KeywordSerializer(many=True, required=False)
shared = UserSerializer(many=True, required=False) shared = UserSerializer(many=True, required=False)
rating = CustomDecimalField(required=False, allow_null=True, read_only=True) rating = CustomDecimalField(required=False, allow_null=True, read_only=True)
last_cooked = serializers.DateTimeField(required=False, allow_null=True, read_only=True) last_cooked = serializers.DateTimeField(required=False, allow_null=True, read_only=True)

View File

@ -2200,7 +2200,7 @@ export interface Recipe {
* @type {Array<RecipeKeywords>} * @type {Array<RecipeKeywords>}
* @memberof Recipe * @memberof Recipe
*/ */
keywords: Array<RecipeKeywords>; keywords?: Array<RecipeKeywords>;
/** /**
* *
* @type {Array<RecipeSteps>} * @type {Array<RecipeSteps>}