Merge pull request #2091 from davidamandoestrada/BugFix#2088
Manager.py is returning a couple of querysets instead of lists. Fix for bug #2088
This commit is contained in:
commit
f0eda7db74
2 changed files with 4 additions and 4 deletions
|
|
@ -159,7 +159,7 @@ class ObjectDBManager(TypedObjectManager):
|
||||||
typeclasses (list, optional): Python pats to restrict matches with.
|
typeclasses (list, optional): Python pats to restrict matches with.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
matches (list): Objects fullfilling both the `attribute_name` and
|
matches (query): Objects fullfilling both the `attribute_name` and
|
||||||
`attribute_value` criterions.
|
`attribute_value` criterions.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
@ -273,7 +273,7 @@ class ObjectDBManager(TypedObjectManager):
|
||||||
to exclude from the match.
|
to exclude from the match.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
contents (list): Matching contents, without excludeobj, if given.
|
contents (query): Matching contents, without excludeobj, if given.
|
||||||
"""
|
"""
|
||||||
exclude_restriction = (
|
exclude_restriction = (
|
||||||
Q(pk__in=[_GA(obj, "id") for obj in make_iter(excludeobj)]) if excludeobj else Q()
|
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.
|
typeclasses (list): Only match objects with typeclasses having thess path strings.
|
||||||
|
|
||||||
Returns:
|
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 not isinstance(ostring, str):
|
||||||
if hasattr(ostring, "key"):
|
if hasattr(ostring, "key"):
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
|
||||||
)
|
)
|
||||||
|
|
||||||
if quiet:
|
if quiet:
|
||||||
return results
|
return list(results)
|
||||||
return _AT_SEARCH_RESULT(
|
return _AT_SEARCH_RESULT(
|
||||||
results,
|
results,
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue