mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02: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
|
|
@ -81,6 +81,17 @@ class TypedObjectManager(idmapper.manager.SharedMemoryManager):
|
|||
except Exception:
|
||||
return None
|
||||
return dbref
|
||||
|
||||
@returns_typeclass_list
|
||||
def get_with_attr(self, attribute_name, attribute_value=None):
|
||||
"""
|
||||
Returns the typeclassed entity depending on having a given attribute.
|
||||
|
||||
attribute_name - only entities with an attribute of this name will be included in match
|
||||
attribute_value - if != None, only entities with db.attribute_name=attribute_value will match.
|
||||
"""
|
||||
self.filter()
|
||||
|
||||
|
||||
@returns_typeclass
|
||||
def dbref_search(self, dbref):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue