[UPDT] HORILLA API: Add new field in employee api

This commit is contained in:
Horilla
2024-10-14 11:52:33 +05:30
parent 7d3e896081
commit 477adf932d

View File

@@ -85,7 +85,10 @@ class EmployeeWorkInformationSerializer(serializers.ModelSerializer):
tags = serializers.SerializerMethodField()
def get_tags(self, obj):
return [{"id": tag.id, "title": tag.title} for tag in obj.tags.all()]
return [
{"id": tag.id, "title": tag.title, "color": tag.color}
for tag in obj.tags.all()
]
class Meta:
model = EmployeeWorkInformation