Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KomkovAleksey committed Dec 4, 2023
1 parent 013b3eb commit 15a3f55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def validate(self, data):
def to_representation(self, instance):
request = self.context.get('request')
context = {'request': request}

return SubscriptionSerializer(instance.author, context=context).data


Expand Down Expand Up @@ -423,6 +424,7 @@ class Meta:
def to_representation(self, instance):
request = self.context.get('request')
context = {'request': request}

return ShortRecipeSerializer(instance.recipe, context=context).data


Expand Down Expand Up @@ -450,4 +452,5 @@ class Meta:
def to_representation(self, instance):
request = self.context.get('request')
context = {'request': request}

return ShortRecipeSerializer(instance.recipe, context=context).data

0 comments on commit 15a3f55

Please sign in to comment.