Skip to content

Commit

Permalink
Add categories and categories_list in short category list
Browse files Browse the repository at this point in the history
  • Loading branch information
dougppaz committed Nov 16, 2018
1 parent db0b172 commit 6930f39
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bothub/api/v2/repository/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ class Meta:
'slug',
'description',
'is_private',
'categories',
'categories_list',
'language',
'available_languages',
'created_at',
Expand All @@ -239,6 +241,14 @@ class Meta:
]
read_only = fields

categories = RepositoryCategorySerializer(
many=True,
read_only=True)
categories_list = serializers.SlugRelatedField(
source='categories',
slug_field='name',
many=True,
read_only=True)
owner__nickname = serializers.SlugRelatedField(
source='owner',
slug_field='nickname',
Expand Down

0 comments on commit 6930f39

Please sign in to comment.