Manager.py is returning a couple of querysets instead of lists. Fix for bug #2088
This commit is contained in:
Griatch 2020-04-23 19:19:46 +02:00 committed by GitHub
commit 6c968af313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -159,7 +159,7 @@ class ObjectDBManager(TypedObjectManager):
typeclasses (list, optional): Python pats to restrict matches with.
Returns:
matches (list): Objects fullfilling both the `attribute_name` and
matches (query): Objects fullfilling both the `attribute_name` and
`attribute_value` criterions.
Notes:
@ -273,7 +273,7 @@ class ObjectDBManager(TypedObjectManager):
to exclude from the match.
Returns:
contents (list): Matching contents, without excludeobj, if given.
contents (query): Matching contents, without excludeobj, if given.
"""
exclude_restriction = (
Q(pk__in=[_GA(obj, "id") for obj in make_iter(excludeobj)]) if excludeobj else Q()
@ -291,7 +291,7 @@ class ObjectDBManager(TypedObjectManager):
typeclasses (list): Only match objects with typeclasses having thess path strings.
Returns:
matches (list): A list of matches of length 0, 1 or more.
matches (query): A list of matches of length 0, 1 or more.
"""
if not isinstance(ostring, str):
if hasattr(ostring, "key"):

View file

@ -499,7 +499,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
)
if quiet:
return results
return list(results)
return _AT_SEARCH_RESULT(
results,
self,