mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 23:36:30 +01:00
Fixed a regression in has_attribute caused by changing the location of caches. Resolves Issue 328.
This commit is contained in:
parent
82e57d4ada
commit
e4382e3e8a
2 changed files with 2 additions and 2 deletions
|
|
@ -139,7 +139,7 @@ def get_attr_cache(obj, attrname):
|
|||
"""
|
||||
Attribute cache store
|
||||
"""
|
||||
return _ATTR_CACHE[hashid(obj)].get(attrname)
|
||||
return _ATTR_CACHE[hashid(obj)].get(attrname, None)
|
||||
|
||||
def set_attr_cache(obj, attrname, attrobj):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1321,7 +1321,7 @@ class TypedObject(SharedMemoryModel):
|
|||
|
||||
attribute_name: (str) The attribute's name.
|
||||
"""
|
||||
if attribute_name not in get_attr_cache(self):
|
||||
if not get_attr_cache(self, attribute_name):
|
||||
attrib_obj = _GA(self, "_attribute_class").objects.filter(db_obj=self).filter(
|
||||
db_key__iexact=attribute_name)
|
||||
if attrib_obj:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue