mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 05:57:16 +02:00
Fixed a bug with the who command.
This commit is contained in:
parent
60068771c7
commit
a9a70c91b1
2 changed files with 8 additions and 2 deletions
|
|
@ -134,6 +134,11 @@ class ObjectManager(TypedObjectManager):
|
|||
"""
|
||||
cand_restriction = candidates and Q(pk__in=[_GA(obj, "id") for obj in make_iter(candidates) if obj]) or Q()
|
||||
type_restriction = typeclasses and Q(db_typeclass_path__in=make_iter(typeclasses)) or Q()
|
||||
|
||||
## This doesn't work if attribute_value is an object. Workaround below
|
||||
#q = self.filter(cand_restriction & type_restriction & Q(objattribute__db_key=attribute_name) & Q(objattribute__db_value=attribute_value))
|
||||
#return list(q)
|
||||
|
||||
if isinstance(attribute_value, (basestring, int, float, bool, long)):
|
||||
return self.filter(cand_restriction & type_restriction & Q(objattribute__db_key=attribute_name, objattribute__db_value=attribute_value))
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue