Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
Include string representations of ReportFile report_type and report_s…
Browse files Browse the repository at this point in the history
…tatus fields in serializer
  • Loading branch information
aaronstephenson committed Oct 9, 2019
1 parent 226afdc commit 65ff0c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "lide",
"organization": "U.S. Geological Survey",
"description": "Web services for LILI (LIDE (Laboratory for Infectious Disease and the Environment) Information Management System)",
"version": "v0.119.0",
"version": "v0.119.1",
"status": "Release Candidate",

"permissions": {
Expand Down
6 changes: 4 additions & 2 deletions lideservices/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1883,9 +1883,11 @@ class Meta:
class ReportFileSerializer(serializers.ModelSerializer):
created_by = serializers.StringRelatedField()
modified_by = serializers.StringRelatedField()
report_type_string = serializers.StringRelatedField()
report_status_string = serializers.StringRelatedField()

class Meta:
model = ReportFile
fields = ('id', 'name', 'file', 'report_type', 'report_status', 'fail_reason',
'created_date', 'created_by', 'modified_date', 'modified_by',)
fields = ('id', 'name', 'file', 'report_type', 'report_type_string', 'report_status', 'report_status_string',
'fail_reason', 'created_date', 'created_by', 'modified_date', 'modified_by',)
read_only_fields = ('name',)

0 comments on commit 65ff0c1

Please sign in to comment.