modified get article card current page method

This commit is contained in:
abutalib-kiwi
2023-09-13 14:03:13 +05:30
parent 085607128b
commit eaf67b682f

View File

@ -359,7 +359,7 @@ class ArticleCardlistSerializer(serializers.ModelSerializer):
data = JuniorArticle.objects.filter(junior__auth=context_data, article=obj.article).last()
total_count = self.context.get('card_count')
if data:
return data.current_que_page if data.current_que_page < total_count else data.current_que_page - 1
return data.current_card_page if data.current_card_page < total_count else data.current_card_page - 1
return NUMBER['zero']
class Meta(object):