Skip to content

Commit

Permalink
Fix limit
Browse files Browse the repository at this point in the history
  • Loading branch information
adammcgrath committed Sep 2, 2014
1 parent 8d6d99e commit 686506d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
_AUTHORIZED_APPS = ['dev~ffc-app', 'ffc-app']


def get_films_from_query(q, limit=_SEARCH_LIMIT):
def get_films_from_query(q, limit=None):
"""Create a search query for films from a query string.
Args:
Expand All @@ -25,9 +25,9 @@ def get_films_from_query(q, limit=_SEARCH_LIMIT):
Return:
SearchResults
"""

limit = int(limit or _SEARCH_LIMIT)
query = search.Query(query_string=q,
options=search.QueryOptions(limit=int(limit)))
options=search.QueryOptions(limit=limit))
index = search.Index(name='films')

return index.search(query)
Expand Down

0 comments on commit 686506d

Please sign in to comment.