Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
chore: Change filter() to list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 15, 2021
1 parent 83c347e commit 6a04eed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visualization/views/insights_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def get(self, request):
result = sorted(result, key=lambda k: k[order])

if query is not None:
result = list(filter(lambda i: i["title"].find(query) != -1, result))
result = [i for i in result if i["title"].find(query) != -1]

return JsonResponse({"data": self.paginate(result, page, count=count)})

Expand Down

0 comments on commit 6a04eed

Please sign in to comment.