Skip to content

Commit

Permalink
Strip surrounding whitespace for Reddit boards
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed May 25, 2021
1 parent 8c683e6 commit 1825c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasources/reddit/search_reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def validate_query(query, request, user):
"""
# we need a board!
r_prefix = re.compile(r"^/?r/")
boards = [r_prefix.sub("", board) for board in query.get("board", "").split(",") if board.strip()]
boards = [r_prefix.sub("", board).strip() for board in query.get("board", "").split(",") if board.strip()]

if not boards:
raise QueryParametersException("Please provide a board or a comma-separated list of boards to query.")
Expand Down

0 comments on commit 1825c25

Please sign in to comment.