supermarket shopping list relation

This commit is contained in:
vabene1111
2021-01-26 16:53:05 +01:00
parent 5ab19b7958
commit 96c4823664
4 changed files with 59 additions and 24 deletions

View File

@@ -362,12 +362,13 @@ class ShoppingListSerializer(WritableNestedModelSerializer):
recipes = ShoppingListRecipeSerializer(many=True, allow_null=True)
entries = ShoppingListEntrySerializer(many=True, allow_null=True)
shared = UserNameSerializer(many=True)
supermarket = SupermarketSerializer(allow_null=True)
class Meta:
model = ShoppingList
fields = (
'id', 'uuid', 'note', 'recipes', 'entries',
'shared', 'finished', 'created_by', 'created_at'
'shared', 'finished', 'supermarket', 'created_by', 'created_at'
)
read_only_fields = ('id',)