Skip to content

Commit

Permalink
Return articles slug instead of title
Browse files Browse the repository at this point in the history
  • Loading branch information
Colline Waitire authored and Colline Waitire committed Sep 21, 2018
1 parent cde6e03 commit c86be8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authors/apps/articles/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def create(self, validated_data):
def to_representation(self, instance):
response = super().to_representation(instance)
response["user"] = instance.user.username
response["article"] = instance.article.title
response["article_slug"] = instance.article.slug
return response

class Meta:
Expand Down

0 comments on commit c86be8f

Please sign in to comment.