mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 20:59:28 -05:00
fix serializer using food name instead of supermarket name
This commit is contained in:
@@ -424,7 +424,7 @@ class FoodSerializer(UniqueFieldsMixin, WritableNestedModelSerializer, ExtendedR
|
||||
sm_category = validated_data['supermarket_category']
|
||||
sc_name = sm_category.pop('name', None)
|
||||
validated_data['supermarket_category'], sc_created = SupermarketCategory.objects.get_or_create(
|
||||
name=name,
|
||||
name=sc_name,
|
||||
space=space, defaults=sm_category)
|
||||
onhand = validated_data.pop('food_onhand', None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user