Return an empty list when searching for a script by #dbref and there is

no such script.
This commit is contained in:
Simon Vermeersch 2017-01-05 21:39:57 +01:00 committed by Griatch
parent 4be45a6295
commit 5a4dbea3bb

View file

@ -85,7 +85,7 @@ class ScriptDBManager(TypedObjectManager):
script = []
dbref = self.dbref(key)
if dbref or dbref == 0:
script = [self.dbref_search(dbref)]
script = filter(None, [self.dbref_search(dbref)])
if not script:
script = self.filter(db_key=key)
return script