mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +00:00
Merge pull request #331 from KiwiTechLLC/ZBKBCK-52
modified get article card current page method
This commit is contained in:
@ -359,7 +359,7 @@ class ArticleCardlistSerializer(serializers.ModelSerializer):
|
|||||||
data = JuniorArticle.objects.filter(junior__auth=context_data, article=obj.article).last()
|
data = JuniorArticle.objects.filter(junior__auth=context_data, article=obj.article).last()
|
||||||
total_count = self.context.get('card_count')
|
total_count = self.context.get('card_count')
|
||||||
if data:
|
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']
|
return NUMBER['zero']
|
||||||
|
|
||||||
class Meta(object):
|
class Meta(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user