mirror of
https://github.com/evennia/evennia.git
synced 2026-03-20 14:56:30 +01:00
Reverting caching-changes to cmdset_storage, causes spurious errors.
This commit is contained in:
parent
71c7d5f8e0
commit
bdf86b203d
1 changed files with 5 additions and 14 deletions
|
|
@ -379,31 +379,22 @@ class ObjectDB(TypedObject):
|
|||
#@property
|
||||
def cmdset_storage_get(self):
|
||||
"Getter. Allows for value = self.name. Returns a list of cmdset_storage."
|
||||
try:
|
||||
return get_cache(self, "cmdset_storage")
|
||||
except AttributeError:
|
||||
cstorage = [path.strip() for path in self.db_cmdset_storage.split(',')]
|
||||
SA(self, "_cached_db_cmdset_storage", cstorage)
|
||||
return cstorage
|
||||
if self.db_cmdset_storage:
|
||||
return [path.strip() for path in self.db_cmdset_storage.split(',')]
|
||||
return []
|
||||
#@cmdset_storage.setter
|
||||
def cmdset_storage_set(self, value):
|
||||
"Setter. Allows for self.name = value. Stores as a comma-separated string."
|
||||
value = ",".join(str(val).strip() for val in make_iter(value))
|
||||
SA(self, "db_cmdset_storate", value)
|
||||
GA(self, "save")()
|
||||
value = [path for path in value.split(',')]
|
||||
SA(self, "_cached_db_cmdset_storage", value)
|
||||
|
||||
value = ",".join(str(val).strip() for val in make_iter(value))
|
||||
self.db_cmdset_storage = value
|
||||
self.save()
|
||||
#@cmdset_storage.deleter
|
||||
def cmdset_storage_del(self):
|
||||
"Deleter. Allows for del self.name"
|
||||
self.db_cmdset_storage = ""
|
||||
self.save()
|
||||
del_cache(self, "cmdset_storage")
|
||||
cmdset_storage = property(cmdset_storage_get, cmdset_storage_set, cmdset_storage_del)
|
||||
|
||||
|
||||
class Meta:
|
||||
"Define Django meta options"
|
||||
verbose_name = "Object"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue