Get values correctly

This commit is contained in:
PCoder 2021-09-02 07:17:08 +05:30
parent 82e4842f68
commit 77fa49ac2b

View file

@ -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'])),