Skip to content

Commit

Permalink
Испрален вывод информации о подписках.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugemos committed Sep 3, 2023
1 parent c37d1b0 commit 30bfc97
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ class Meta(UserSerializer.Meta):

def get_recipes_count(self, user):
"""Возвращает значение для поля recipes_count."""
limit = self.get_recipes_limit()
count = user.recipes.count()
return min(limit, count) if limit else count
# limit = self.get_recipes_limit()
return user.recipes.count()
# count = user.recipes.count()
# return min(limit, count) if limit else count

def get_recipes(self, user):
"""Возвращает значение для поля recipes."""
Expand Down

0 comments on commit 30bfc97

Please sign in to comment.