Skip to content

Commit

Permalink
Fix company name and logo not showing up in vacancies API (#3867)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucAngevare authored Dec 5, 2024
1 parent e2d5056 commit ec37732
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions website/partners/api/v2/serializers/vacancy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from rest_framework import serializers

from partners.models import Vacancy
from thaliawebsite.api.v2.serializers.cleaned_model_serializer import (
CleanedModelSerializer,
)
from thaliawebsite.api.v2.serializers.thumbnail import ThumbnailSerializer

from .vacancy_category import VacancyCategorySerializer

Expand All @@ -26,4 +29,10 @@ class Meta:
"categories",
)

company_name = serializers.CharField(source="get_company_name", read_only=True)
company_logo = serializers.SerializerMethodField("_company_logo")

def _company_logo(self, instance):
return ThumbnailSerializer().to_representation(instance.get_company_logo())

categories = VacancyCategorySerializer(many=True)
Empty file.

0 comments on commit ec37732

Please sign in to comment.