Fix taxon

This commit is contained in:
PCoder 2022-03-05 01:28:29 +05:30
parent 2dda215ffe
commit da8fba3497

View file

@ -183,7 +183,10 @@ def get_paginated(query_set, page, per_page):
for r in p.fieldspeople_set.all():
filters['field'].append(r.field.name)
for r in p.taxapeople_set.all():
if r.taxon and r.taxon.name:
filters['taxon'].append(r.taxon.name)
else:
print("r.taxon.name is None %s %s" % (r.range_id, r.taxon))
filters = {
'country': sorted(set(filters['country'])),
'range': sorted(set(filters['range'])),