diff --git a/app/views.py b/app/views.py index d618463..a04aadb 100644 --- a/app/views.py +++ b/app/views.py @@ -176,11 +176,11 @@ def get_paginated(query_set, page, per_page): for p in paginator.object_list: filters['country'].append(p.country) for r in p.rangespeople_set.all(): - filters['range'].append(r.name) + filters['range'].append(r.range.name) for r in p.fieldspeople_set.all(): - filters['field'].append(r.name) + filters['field'].append(r.field.name) for r in p.taxapeople_set.all(): - filters['taxon'].append(r.name) + filters['taxon'].append(r.taxon.name) filters = { 'country': sorted(set(filters['country'])), 'range': sorted(set(filters['range'])),