markov: force the target/context to lowercase

This commit is contained in:
Brian S. Stephan 2015-09-17 22:35:04 -05:00
parent e8d57b29b2
commit 4f17234a0a
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ def generate_sentence(context, topics=None, max_words=30):
def get_or_create_target_context(target_name):
"""Return the context for a provided nick/channel, creating missing ones."""
target_name = target_name.lower()
# find the stuff, or create it
try:
target = MarkovTarget.objects.get(name=target_name)