Skip to content

Commit

Permalink
Serialize work type ID
Browse files Browse the repository at this point in the history
Serialize the ID of work types to be able to use the
`/api/library/work-types/{id}` route, otherwise the ID has to be guessed.

Found while trying to implement feeding in Japan7/karaberus#38
  • Loading branch information
odrling committed Jul 23, 2024
1 parent 7b916ae commit 811c57d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dakara_server/library/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class WorkTypeSerializer(serializers.ModelSerializer):

class Meta:
model = WorkType
fields = ("name", "name_plural", "query_name", "icon_name")
fields = ("id", "name", "name_plural", "query_name", "icon_name")

@staticmethod
def set(work_type_data):
Expand Down

0 comments on commit 811c57d

Please sign in to comment.