Include a missing file for previous commit.
This commit is contained in:
parent
d76b7b0454
commit
f5ba4f6204
1 changed files with 6 additions and 3 deletions
|
|
@ -288,7 +288,8 @@ class ObjectDBManager(TypedObjectManager):
|
||||||
attribute_name=None,
|
attribute_name=None,
|
||||||
typeclass=None,
|
typeclass=None,
|
||||||
candidates=None,
|
candidates=None,
|
||||||
exact=True):
|
exact=True,
|
||||||
|
use_dbref=True):
|
||||||
"""
|
"""
|
||||||
Search as an object globally or in a list of candidates and
|
Search as an object globally or in a list of candidates and
|
||||||
return results. The result is always an Object. Always returns
|
return results. The result is always an Object. Always returns
|
||||||
|
|
@ -321,6 +322,8 @@ class ObjectDBManager(TypedObjectManager):
|
||||||
used together with the `candidates` keyword to limit the
|
used together with the `candidates` keyword to limit the
|
||||||
number of possibilities. This value has no meaning if
|
number of possibilities. This value has no meaning if
|
||||||
searching for attributes/properties.
|
searching for attributes/properties.
|
||||||
|
use_dbref (bool): If False, bypass direct lookup of a string
|
||||||
|
on the form #dbref and treat it like any string.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
matches (list): Matching objects
|
matches (list): Matching objects
|
||||||
|
|
@ -361,8 +364,8 @@ class ObjectDBManager(TypedObjectManager):
|
||||||
candidates = [cand for cand in candidates
|
candidates = [cand for cand in candidates
|
||||||
if _GA(cand, "db_typeclass_path") in typeclass]
|
if _GA(cand, "db_typeclass_path") in typeclass]
|
||||||
|
|
||||||
dbref = not attribute_name and exact and self.dbref(searchdata)
|
dbref = not attribute_name and exact and use_dbref and self.dbref(searchdata)
|
||||||
if dbref is not None:
|
if dbref:
|
||||||
# Easiest case - dbref matching (always exact)
|
# Easiest case - dbref matching (always exact)
|
||||||
dbref_match = self.dbref_search(dbref)
|
dbref_match = self.dbref_search(dbref)
|
||||||
if dbref_match:
|
if dbref_match:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue