Skip to content

Commit

Permalink
Hotfix v18 : votes negatifs (#3635)
Browse files Browse the repository at this point in the history
gustavi authored and GerardPaligot committed May 28, 2016
1 parent a85b875 commit bc63d2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zds/utils/api/serializers.py
Original file line number Diff line number Diff line change
@@ -13,10 +13,14 @@ class Meta:
fields = ('count', 'users')


class DislikesSerializer(LikesSerializer):
class DislikesSerializer(ModelSerializer):
count = IntegerField(source='dislike', read_only=True)
users = UserListSerializer(source='get_dislikers', many=True, read_only=True)

class Meta:
model = Comment
fields = ('count', 'users')


class KarmaSerializer(ModelSerializer):
like = LikesSerializer(source='*', read_only=True)

0 comments on commit bc63d2b

Please sign in to comment.