Skip to content

Commit

Permalink
show all members if there are no active members
Browse files Browse the repository at this point in the history
  • Loading branch information
jsayles committed Dec 6, 2016
1 parent d143e17 commit e05d594
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions members/views/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def org_list(request):
if search_form.is_valid():
search_terms = search_form.cleaned_data['terms']
search_results = Organization.objects.search(search_terms)

else:
search_form = OrganizationSearchForm()

Expand All @@ -53,11 +53,12 @@ def org_view(request, org_id):
else:
counts['inactive'] = counts['inactive'] + 1

show_all = 'show_all' in request.GET or counts['active'] == 0
context = {'organization': org,
'can_edit':can_edit,
'members': members,
'counts': counts,
'show_all': 'show_all' in request.GET,
'show_all': show_all,
}
return render(request, 'members/org_view.html', context)

Expand Down

0 comments on commit e05d594

Please sign in to comment.