mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 02:06:32 +01:00
Fixed a caching issue with TypedAttributes.
This commit is contained in:
parent
82a10903d1
commit
d4c97d7df8
3 changed files with 18 additions and 5 deletions
|
|
@ -119,8 +119,10 @@ class ObjectManager(TypedObjectManager):
|
|||
from src.objects.models import ObjAttribute
|
||||
lstring = ""
|
||||
if location:
|
||||
lstring = ", db_obj__db_location=location"
|
||||
lstring = ", db_obj__db_location=location"
|
||||
attrs = eval("ObjAttribute.objects.filter(db_key=attribute_name%s)" % lstring)
|
||||
# since attribute values are pickled in database, we cannot search directly, but
|
||||
# must loop through the results. .
|
||||
if exact:
|
||||
return [attr.obj for attr in attrs if attribute_value == attr.value]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue