Skip to content

Commit

Permalink
Use case-insensitive compare for stacks when finding featured guide
Browse files Browse the repository at this point in the history
  • Loading branch information
durden committed May 12, 2016
1 parent 04d3dd9 commit ce8f0a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pskb_website/models/featured.py
Expand Up @@ -84,12 +84,12 @@ def get_featured_article(articles=None):

title = title.strip()
if stack is not None:
stack = stack.strip()
stack = stack.strip().lower()

for article in articles:
# Don't allow surrounding spaces to mismatch
if article.title.strip() == title:
if stack is None or article.stacks[0].strip() == stack:
if stack is None or article.stacks[0].strip().lower() == stack:
return article

return None

0 comments on commit ce8f0a0

Please sign in to comment.