Commit bc9cb134 authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Modify topics count

parent e67e5852
......@@ -156,7 +156,7 @@ class UserStatsSerializer(serializers.ModelSerializer):
return obj.actor_actions.filter(verb='access', timestamp__gte=time_delta).count()
def get_topics(self, obj):
return Topic.objects.filter(author=obj).count()
return Topic.objects.filter(author=obj).exclude(forum__forum_type='activity').count()
def get_reactions(self, obj):
return TopicLike.objects.filter(user=obj).count() + CommentLike.objects.filter(user=obj).count()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment