Append range name only if not none
This commit is contained in:
parent
401b554a1c
commit
2dda215ffe
1 changed files with 4 additions and 1 deletions
|
@ -176,7 +176,10 @@ def get_paginated(query_set, page, per_page):
|
|||
for p in paginator.object_list:
|
||||
filters['country'].append(p.country.short_name)
|
||||
for r in p.peoplerange_set.all():
|
||||
if r.range and r.range.range_name:
|
||||
filters['range'].append(r.range.range_name)
|
||||
else:
|
||||
print("r.range.range_name is None %s %s" % (r.range_id, r.person_id))
|
||||
for r in p.fieldspeople_set.all():
|
||||
filters['field'].append(r.field.name)
|
||||
for r in p.taxapeople_set.all():
|
||||
|
|
Loading…
Reference in a new issue