diff --git a/evennia/contrib/rpsystem.py b/evennia/contrib/rpsystem.py index 5e917f6c80..6a6874536a 100644 --- a/evennia/contrib/rpsystem.py +++ b/evennia/contrib/rpsystem.py @@ -1155,7 +1155,7 @@ class ContribRPObject(DefaultObject): # only allow exact matching if searching the entire database # or unique #dbrefs exact = True - elif not candidates: + elif candidates is None: # no custom candidates given - get them automatically if location: # location(s) were given diff --git a/evennia/objects/manager.py b/evennia/objects/manager.py index d3301e536d..656d699b3f 100644 --- a/evennia/objects/manager.py +++ b/evennia/objects/manager.py @@ -357,7 +357,10 @@ class ObjectDBManager(TypedObjectManager): typeclasses[i] = u"%s" % typeclass typeclass = typeclasses - if candidates: + if candidates is not None: + if not candidates: + # candidates is the empty list. This should mean no matches can ever be acquired. + return [] # Convenience check to make sure candidates are really dbobjs candidates = [cand for cand in make_iter(candidates) if cand] if typeclass: diff --git a/evennia/objects/objects.py b/evennia/objects/objects.py index eb96d6dfe3..97145a0ade 100644 --- a/evennia/objects/objects.py +++ b/evennia/objects/objects.py @@ -361,7 +361,7 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)): # only allow exact matching if searching the entire database # or unique #dbrefs exact = True - elif not candidates: + elif candidates is None: # no custom candidates given - get them automatically if location: # location(s) were given