Made so the local_and_global_search strips the query of surrounding whitespace. Many calling functions don't do this properly, making it a source of bugs. E.g. "@desc obj = text" did not locate obj but "@desc obj= text" did.

This commit is contained in:
Griatch 2009-05-01 07:16:44 +00:00
parent ba623af351
commit cae925c29b
3 changed files with 10 additions and 10 deletions

View file

@ -205,7 +205,7 @@ class ObjectManager(models.Manager):
dbref_only: (bool) Only compare dbrefs.
limit_types: (list of int) A list of Object type numbers to filter by.
"""
search_query = ostring
search_query = str(ostring).strip()
# This is a global dbref search. Not applicable if we're only searching
# searcher's contents/locations, dbref comparisons for location/contents