mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 07:46:30 +01:00
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:
parent
99c2dda8dc
commit
31daf5b013
2 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue