Skip to content

Commit

Permalink
Na API de issue, adiciona o idioma das seções do sumário (#867)
Browse files Browse the repository at this point in the history
* Altera nome do campo code2 para language em MissionSerializer

* Adiciona campo language em TocSectionsSerializer
  • Loading branch information
samuelveigarangel authored Oct 1, 2024
1 parent 9b7feef commit d96fde2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions issue/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
from core.api.v1.serializers import LicenseStatementSerializer
from issue import models
from journal.models import SciELOJournal
from journal.api.v1.serializers import JournalSerializer
from location.api.v1.serializers import CitySerializer

class TocSectionsSerializer(serializers.ModelSerializer):
language = serializers.CharField(source="language.code2")

class Meta:
model = models.TocSection
fields = [
"plain_text",
"language",
]


Expand Down
4 changes: 2 additions & 2 deletions journal/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ class Meta:


class MissionSerializer(serializers.ModelSerializer):
code2 = serializers.CharField(source="language.code2")
language = serializers.CharField(source="language.code2")

class Meta:
model = models.Mission
fields = [
"rich_text",
"code2",
"language",
]


Expand Down

0 comments on commit d96fde2

Please sign in to comment.