Added an extra check to make sure the 'candidates' keyword to ev.search_object always contain proper dbobjs and not typeclasses. Resolves Issue 280.

This commit is contained in:
Griatch 2012-10-14 13:25:25 +02:00
parent 99c2dda8dc
commit 31daf5b013
2 changed files with 8 additions and 0 deletions

View file

@ -273,6 +273,10 @@ class ObjectManager(TypedObjectManager):
if dbref_match:
return [dbref_match]
# Convenience check to make sure candidates are really dbobjs
if candidates:
candidates = [cand.dbobj for cand in make_iter(candidates) if hasattr(cand, "dbobj")]
# Search through all possibilities.
match_number = None