From 4f17234a0ab92e8cef9095a439af5e77f87bb7f8 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 17 Sep 2015 22:35:04 -0500 Subject: [PATCH] markov: force the target/context to lowercase --- dr_botzo/markov/lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dr_botzo/markov/lib.py b/dr_botzo/markov/lib.py index 370a602..3b2d693 100644 --- a/dr_botzo/markov/lib.py +++ b/dr_botzo/markov/lib.py @@ -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)