Fix unit tests
This commit is contained in:
parent
b5a1e8ddea
commit
7adb4c7da4
1 changed files with 2 additions and 2 deletions
|
|
@ -388,7 +388,7 @@ def search_db_prototype(key=None, tags=None, return_queryset=False):
|
||||||
tags (str or list): Tag key or keys to query for. These
|
tags (str or list): Tag key or keys to query for. These
|
||||||
will always be applied with the 'db_protototype'
|
will always be applied with the 'db_protototype'
|
||||||
tag category.
|
tag category.
|
||||||
return_queryset (bool): Return the database queryset.
|
return_queryset (bool, optional): Return the database queryset.
|
||||||
Return:
|
Return:
|
||||||
matches (queryset or list): All found DbPrototypes. If `return_queryset`
|
matches (queryset or list): All found DbPrototypes. If `return_queryset`
|
||||||
is not set, this is a list of prototype dicts.
|
is not set, this is a list of prototype dicts.
|
||||||
|
|
@ -410,7 +410,7 @@ def search_db_prototype(key=None, tags=None, return_queryset=False):
|
||||||
matches = matches.filter(db_key=key) or matches.filter(db_key__icontains=key)
|
matches = matches.filter(db_key=key) or matches.filter(db_key__icontains=key)
|
||||||
if not return_queryset:
|
if not return_queryset:
|
||||||
# return prototype
|
# return prototype
|
||||||
return [dbprot.attributes.get("prototype", {}) for dbprot in matches]
|
matches = [dict(dbprot.attributes.get("prototype", {})) for dbprot in matches]
|
||||||
return matches
|
return matches
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue