mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 06:57:16 +02:00
Made search_object slightly less picky about db fields, per #445
This commit is contained in:
parent
56601d0bbc
commit
81c57da56b
1 changed files with 2 additions and 0 deletions
|
|
@ -156,6 +156,8 @@ class ObjectManager(TypedObjectManager):
|
|||
if isinstance(property_name, basestring):
|
||||
if not property_name.startswith('db_'):
|
||||
property_name = "db_%s" % property_name
|
||||
if hasattr(property_value, 'dbobj'):
|
||||
property_value = property_value.dbobj
|
||||
querykwargs = {property_name:property_value}
|
||||
cand_restriction = candidates != None 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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue