mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fixed issue #448, which prevented searching for objects with a specific attribute name.
This commit is contained in:
parent
46a7e891d1
commit
56601d0bbc
1 changed files with 2 additions and 2 deletions
|
|
@ -98,8 +98,8 @@ class ObjectManager(TypedObjectManager):
|
|||
Returns all objects having the given attribute_name defined at all.
|
||||
Location should be a valid location object.
|
||||
"""
|
||||
cand_restriction = candidates != None and Q(objattribute__db_obj__pk__in=[_GA(obj, "id") for obj in make_iter(candidates) if obj]) or Q()
|
||||
return list(self.filter(cand_restriction & Q(objattribute__db_key=attribute_name)))
|
||||
cand_restriction = candidates != None and Q(db_attributes__db_obj__pk__in=[_GA(obj, "id") for obj in make_iter(candidates) if obj]) or Q()
|
||||
return list(self.filter(cand_restriction & Q(db_attributes__db_key=attribute_name)))
|
||||
|
||||
@returns_typeclass_list
|
||||
def get_objs_with_attr_value(self, attribute_name, attribute_value, candidates=None, typeclasses=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue