Skip to content

Commit ef2ed76

Browse files
Merge pull request #1770 from IFRCGo/feature/better-appealdoc-columns-support
Better appealDoc columns support
2 parents 379d65b + 45bab9b commit ef2ed76

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/serializers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,9 +839,12 @@ class Meta:
839839

840840

841841
class AppealDocumentSerializer(ModelSerializer):
842+
appeal = serializers.CharField(source='appeal.code', read_only=True)
843+
type = serializers.CharField(source='type.name', read_only=True) # seems to be identical to the appealdoc name
844+
842845
class Meta:
843846
model = AppealDocument
844-
fields = ('created_at', 'name', 'document', 'document_url', 'appeal', 'id',)
847+
fields = ('created_at', 'name', 'document', 'document_url', 'appeal', 'type', 'iso', 'description', 'id',)
845848

846849

847850
class ProfileSerializer(ModelSerializer):

0 commit comments

Comments
 (0)