Fixed an error in aliasing
This commit is contained in:
parent
584d1095ad
commit
a00179b742
2 changed files with 3 additions and 3 deletions
|
|
@ -207,7 +207,7 @@ class ObjectManager(TypedObjectManager):
|
||||||
key_candidates = self.filter(cand_restriction & type_restriction)
|
key_candidates = self.filter(cand_restriction & type_restriction)
|
||||||
else:
|
else:
|
||||||
# fuzzy without supplied candidates - we select our own candidates
|
# fuzzy without supplied candidates - we select our own candidates
|
||||||
key_candidates = self.filter(type_restriction & (Q(db_key__istartswith=ostring) | Q(alias__db_key__istartswith=ostring))).distinct()
|
key_candidates = self.filter(type_restriction & (Q(db_key__istartswith=ostring) | Q(db_tags__db_key__istartswith=ostring))).distinct()
|
||||||
candidates_id = [_GA(obj, "id") for obj in key_candidates]
|
candidates_id = [_GA(obj, "id") for obj in key_candidates]
|
||||||
# fuzzy matching
|
# fuzzy matching
|
||||||
key_strings = key_candidates.values_list("db_key", flat=True)
|
key_strings = key_candidates.values_list("db_key", flat=True)
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,8 @@ class ObjectDB(TypedObject):
|
||||||
_GA(self, "cmdset").update(init_mode=True)
|
_GA(self, "cmdset").update(init_mode=True)
|
||||||
_SA(self, "scripts", ScriptHandler(self))
|
_SA(self, "scripts", ScriptHandler(self))
|
||||||
_SA(self, "attributes", AttributeHandler(self))
|
_SA(self, "attributes", AttributeHandler(self))
|
||||||
_SA(self, "tags", TagHandler(self))
|
_SA(self, "tags", TagHandler(self, category_prefix="object_"))
|
||||||
_SA(self, "aliases", AliasHandler(self))
|
_SA(self, "aliases", AliasHandler(self, category_prefix="object_"))
|
||||||
_SA(self, "nicks", NickHandler(self))
|
_SA(self, "nicks", NickHandler(self))
|
||||||
# make sure to sync the contents cache when initializing
|
# make sure to sync the contents cache when initializing
|
||||||
_GA(self, "contents_update")()
|
_GA(self, "contents_update")()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue