]> git.cworth.org Git - turbot/blobdiff - turbot/interaction.py
Fix error with missing search terems
[turbot] / turbot / interaction.py
index 164e4311fbca7c76c262438cb758fe437cdbeb46..e6f7503e20bf2ffd5a1e53ae924230ab370a4931 100644 (file)
@@ -626,15 +626,16 @@ def hunt(turb, body, args):
     characters, (though quotation marks can be used to include a space
     character in a term). All terms must match on a puzzle in order
     for that puzzle to be included. But a puzzle will be considered to
-    match if any of the puzzle title, round title, puzzle URL, or
-    puzzle solution match. Matching will be performed without regard
-    to case sensitivity and the search terms can include regular
-    expression syntax.
+    match if any of the puzzle title, round title, puzzle URL, puzzle
+    state, or puzzle solution match. Matching will be performed
+    without regard to case sensitivity and the search terms can
+    include regular expression syntax.
     """
 
     channel_id = body['channel_id'][0]
     response_url = body['response_url'][0]
 
+    terms = None
     if args:
         # The first word can be a puzzle status and all remaining word
         # (if any) are search terms. _But_, if the first word is not a
@@ -649,7 +650,6 @@ def hunt(turb, body, args):
             status = 'unsolved'
     else:
         status = 'unsolved'
-        terms = None
 
     # Separate search terms on spaces (but allow for quotation marks
     # to capture spaces in a search term)