ObjectDB.objects.get_objs_with_key_or_alias() now uses icontains instead of istartswith for inexact searches against db_key to match behavior with alias.
This commit is contained in:
parent
99d300799e
commit
894ae978b9
1 changed files with 1 additions and 1 deletions
|
|
@ -324,7 +324,7 @@ class ObjectDBManager(TypedObjectManager):
|
||||||
search_candidates = (
|
search_candidates = (
|
||||||
self.filter(
|
self.filter(
|
||||||
type_restriction
|
type_restriction
|
||||||
& (Q(db_key__istartswith=ostring) | Q(db_tags__db_key__istartswith=ostring))
|
& (Q(db_key__icontains=ostring) | Q(db_tags__db_key__icontains=ostring))
|
||||||
)
|
)
|
||||||
.distinct()
|
.distinct()
|
||||||
.order_by("id")
|
.order_by("id")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue