diff --git a/app/views.py b/app/views.py index a04aadb..20e021d 100644 --- a/app/views.py +++ b/app/views.py @@ -239,12 +239,12 @@ class PeopleDetailView(View): person = get_object_or_404(Person, id=people_id) return_data = { 'data': person.dict(), - 'resources': [r.dict() for r in person.resourcespeople_set.all()], - 'ranges': [r.dict() for r in person.rangespeople_set.all()], - 'fields': [r.name for r in person.fieldspeople_set.all()], - 'methods': [r.name for r in person.methodspeople_set.all()], - 'scales': [r.name for r in person.scalespeople_set.all()], - 'taxa': [r.name for r in person.taxapeople_set.all()], + 'resources': [r.resource.dict() for r in person.resourcespeople_set.all()], + 'ranges': [r.range.dict() for r in person.rangespeople_set.all()], + 'fields': [r.field.name for r in person.fieldspeople_set.all()], + 'methods': [r.method.name for r in person.methodspeople_set.all()], + 'scales': [r.scale.name for r in person.scalespeople_set.all()], + 'taxa': [r.taxon.name for r in person.taxapeople_set.all()], } return JsonResponse(return_data)