Homogenize manager search methods to return querysets. Resolve #2384.
This commit is contained in:
parent
01af303457
commit
9c0b44e13a
7 changed files with 65 additions and 39 deletions
|
|
@ -464,10 +464,13 @@ class TypedObjectManager(idmapper.manager.SharedMemoryManager):
|
|||
dbref (str or int): The id to search for.
|
||||
|
||||
Returns:
|
||||
object (TypedObject): The matched object.
|
||||
Queryset: Queryset with 0 or 1 match.
|
||||
|
||||
"""
|
||||
return self.get_id(dbref)
|
||||
dbref = self.dbref(dbref, reqhash=False)
|
||||
if dbref:
|
||||
return self.filter(id=dbref)
|
||||
return self.none()
|
||||
|
||||
def get_dbref_range(self, min_dbref=None, max_dbref=None):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue