Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kbecker42 committed Sep 15, 2022
1 parent ac88368 commit c8440d7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pybossa/view/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -3197,12 +3197,7 @@ def coowners(short_name):
users = user_repo.search_by_name(query, **filters)

# If searching contacts, filter results to only coowners.
if params.get('contact'):
filtered_list = []
for user in users:
if user.id in project.owners_ids:
filtered_list.append(user)
users = filtered_list
users = [user for user in users if user.id in project.owners_ids] if params.get('contact') else users

if not users:
markup = Markup('<strong>{}</strong> {} <strong>{}</strong>')
Expand Down

0 comments on commit c8440d7

Please sign in to comment.