From ee450a4fed77d55a292d47b5b0efa97755f252d7 Mon Sep 17 00:00:00 2001 From: Griatch Date: Tue, 18 Sep 2012 21:48:41 +0200 Subject: [PATCH] Fixed a bug in the search method causing it to fail for commands ignoring the error handler (such as drop). Resolves issue 252. --- src/objects/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/objects/models.py b/src/objects/models.py index 5010938566..ab21753f71 100644 --- a/src/objects/models.py +++ b/src/objects/models.py @@ -581,8 +581,9 @@ class ObjectDB(TypedObject): attribute_name=attribute_name, candidates=candidates, exact=exact) - if not ignore_errors: - result = _AT_SEARCH_RESULT(self, ostring, results, global_search) + if ignore_errors: + return results + result = _AT_SEARCH_RESULT(self, ostring, results, global_search) if player and result: return result.player return result