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

Commit

Permalink
Properly reference ReportFile type and status string fields in serial…
Browse files Browse the repository at this point in the history
…izer
  • Loading branch information
aaronstephenson committed Oct 11, 2019
1 parent 65ff0c1 commit b50ae79
Show file tree
Hide file tree
Showing 2 changed files with 9 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.1",
"version": "v0.119.2",
"status": "Release Candidate",

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

def get_report_type_string(self, obj):
return obj.get_report_type_display()

def get_report_status_string(self, obj):
return obj.get_report_status_display()

class Meta:
model = ReportFile
Expand Down

0 comments on commit b50ae79

Please sign in to comment.