From 77fa49ac2bbde3c34fec1af6d8d2bb56a24bf324 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 2 Sep 2021 07:17:08 +0530 Subject: [PATCH] Get values correctly --- app/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'])),