Return no match if using obj.search() with an empty list of candidates. This accounts for candidate lists that are created dynamically, for example limiting them to the inventory (which may be empy). Resolves #1016.

This commit is contained in:
Griatch 2016-08-20 11:00:33 +02:00
parent ca1b76ab02
commit 1da9217a18
3 changed files with 6 additions and 3 deletions

View file

@ -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