mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 06:16:31 +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
|
|
@ -202,6 +202,10 @@ class ScriptManager(TypedObjectManager):
|
|||
ok = False
|
||||
if ok:
|
||||
return [dbref_match]
|
||||
if obj:
|
||||
# convenience check to make sure obj is really a dbobj
|
||||
obj = hasattr(obj, "dbobj") and obj.dbobj or obj
|
||||
|
||||
# not a dbref; normal search
|
||||
scripts = self.filter(db_key__iexact=ostring)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue